<!--流程业务化-可疑品流程-->

<!--用户权限说明-->
<!--管理员：代码：1，可以做所有的操作-->
<!--问题编辑人员：代码：2，可以做问题的修改操作-->
<template>
  <div style="margin: 0;padding: 0">
    <el-container>
      <!--页面表头设计-->
      <el-header style="height: 7vh">
        <el-link class="headMain" href="http://10.255.96.48:3404/">{{main.qualityManagementSystem}}</el-link>
        <span class="center-text">{{main.suspiciousProduct}}</span>
        <el-popover
            placement="top-start"
            title="用户信息"
            width="200"
            trigger="hover">
          <div style="margin-top: 10px">Name：{{useName}}</div>
          <div style="margin-top: 10px">ID:{{useId}}</div>
          <div style="margin-top: 10px" @click="logOut"><el-link>退出</el-link></div>
          <div class="headMain" slot="reference">{{useName}}</div>
        </el-popover>
      </el-header>
      <el-container>
        <el-aside width="200px" style="height: 90vh">
          <div style="margin-top:10px;">
            <el-button style="width: 100%">{{main.assemblyWorkshop}}</el-button>
          </div>
          <div style="margin-top:10px;">
            <el-button style="width: 100%">{{main.machiningWorkshop}}</el-button>
          </div>
          <div style="margin-top:10px;">
            <el-button style="width: 100%">{{main.logistics}}</el-button>
          </div>
        </el-aside>
        <el-container>
          <!--主题设计-->
          <el-main style="height: 80vh;overflow: auto">
            <el-tabs v-model="activeName" @tab-click="handleClick">
              <el-tab-pane :label="main.suspiciousProductHandling" name="first" style="overflow-x: scroll">
                <div style="display: flex; gap: 10px; width: 1290px;" >
                  <div style="border: 1px solid blue; width: 300px;">
                    <div style="margin-top: 8px;font-size: 18px;color: red">{{main.listOfSuspectedItems}}
                    <el-link @click="suspectEdit(1,null)"><i class="el-icon-circle-plus-outline"></i></el-link>
                    </div>
                    <el-table
                      :data="suspectList"
                      border
                      style="width: 100%">
                      <el-table-column
                          prop="partName"
                          :label="main.partName"
                          v-slot:default="scope">
                        <div style="width: 100%" @click="suspectListClick(scope)">
                          <span v-if="languageS==='chinese'">{{scope.row.partName.split('/')[1]}}</span>
                          <span v-if="languageS==='english'">{{scope.row.partName.split('/')[2]}}</span>
                          <span v-if="languageS==='english'">{{scope.row.partName.split('/')[3]}}</span>
                          <el-link style="margin-left: 10px">
                            <i class="el-icon-edit" @click="suspectEdit(2,scope)"></i>
                          </el-link>
                          <el-link style="margin-left: 10px" @click="suspectEdit(3,scope)">
                            <i class="el-icon-delete"></i>
                          </el-link>
                        </div>
                      </el-table-column>
                      <el-table-column
                          prop="occurDate"
                          :label="main.occurDate"
                          v-slot:default="scope">
                        <div style="width: 100%" @click="suspectListClick(scope)">
                          <span>{{scope.row.occurDate}}</span>
                        </div>

                      </el-table-column>
                    </el-table>
                  </div>
                  <div  style="border: 1px solid blue; flex-grow: 1; height: 66vh;overflow-y: scroll">
                    <el-collapse v-if="suspectListShow.length>0" v-model="productNames"  @change="productChange" style="margin: 10px;">
                      <el-collapse-item title="可疑品判定"  name="1">
                        <template v-slot:title>
                          <div style="font-size: 16px">可疑品判定<i class="header-icon el-icon-info"></i></div>
                        </template>
                        <div style="font-size: 14px;margin-left: 40px">
                          <div style="color: red;text-align: left;font-size: 16px;"><strong>基本信息：</strong> </div>
                          <el-table
                            :data="suspectListShow"
                            border
                            style="width: 100%">
                            <el-table-column
                              prop="partName"
                              label="零部件名称"
                              v-slot:default="scope">
                              <span v-if="languageS==='chinese'">{{scope.row.partName.split('/')[1]}}</span>
                              <span v-if="languageS==='english'">{{scope.row.partName.split('/')[2]}}</span>
                              <span v-if="languageS==='english'">{{scope.row.partName.split('/')[3]}}</span>
                            </el-table-column>
                            <el-table-column
                                prop="partSupplier"
                                label="零部件供方">
                            </el-table-column>
                            <el-table-column
                                prop="modelId"
                                label="型号">
                            </el-table-column>
                            <el-table-column
                                prop="occurDate"
                                label="发生时间">
                            </el-table-column>
                            <el-table-column
                                prop="link"
                                label="发生环节"
                                v-slot:default="scope">
                              <span v-if="languageS==='chinese'">{{scope.row.link.split('/')[0]}}</span>
                              <span v-if="languageS==='english'">{{scope.row.link.split('/')[1]}}</span>
                              <span v-if="languageS==='english'">{{scope.row.link.split('/')[2]}}</span>
                            </el-table-column>
                            <el-table-column
                                prop="occurPer"
                                label="发现人">
                            </el-table-column>
                          </el-table>
                          <div style="margin-top: 10px;text-align: left">
                            <span style="margin-left: 10px">工件号：{{suspectListShow[0].partId}}</span>
                            <span style="margin-left: 10px">发生数量：{{suspectListShow[0].partNum}}</span>
                          </div>
                          <div style="margin-top: 10px;text-align: left">
                            <span style="margin-left: 10px">问题描述：{{suspectListShow[0].describeUse}}</span>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="judgmentList.judgment>0 &&judgmentList.judgment!==''"><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;text-align: left;">
                            <span style="margin-left: 10px;color: red;font-size: 16px"><strong>检验员意见：</strong> </span>
                            <span style="margin-left: 10px;color: red" v-if="judgmentList.judgment==='0' || judgmentList.judgment===''">暂未判定</span>
                            <span v-else-if="judgmentList.judgment===1" style="margin-left: 10px;color: red">让步使用</span>
                            <span v-else-if="judgmentList.judgment===2" style="margin-left: 10px;color: red">返工/返修</span>
                            <span v-else-if="judgmentList.judgment===3" style="margin-left: 10px;color: red">料废</span>
                            <span v-else-if="judgmentList.judgment===4" style="margin-left: 10px;color: red">工废</span>
                            <span  style="margin-left: 10px">检验员：</span>
                            <span  style="margin-left: 10px">{{judgmentList.judgmentPer}}</span>
                            <span  style="margin-left: 10px">判定日期：</span>
                            <span  style="margin-left: 10px">{{judgmentList.judgmentDate}}</span>
                          </div>
                          <div style="margin-top: 10px;margin-left: 10px; text-align: left">
                            <el-radio disabled v-model="judgmentList.judgment" label="1">让步使用</el-radio>
                            <el-radio disabled v-model="judgmentList.judgment" label="2">返工/返修</el-radio>
                            <el-radio disabled v-model="judgmentList.judgment" label="3">料废</el-radio>
                            <el-radio disabled v-model="judgmentList.judgment" label="4">工废</el-radio>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary" style="margin-left: 50px" size="mini" @click="judgment(1)">处理</el-button>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="judgmentList.judgmentMark!=='undefined' && judgmentList.judgmentMark!==undefined"><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="color: red;text-align: left;font-size: 16px;margin-left: 10px"><strong>标识隔离：</strong> </div>
                          <div style="margin-top: 10px;text-align: left">
                            <span style="margin-left: 10px">标识人：{{judgmentList.judgmentMark}}</span>
                            <span style="margin-left: 10px">标识隔离时间：{{judgmentList.MarkDate}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary" style="margin-left: 50px" size="mini" @click="judgment(2)">处理</el-button>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="judgmentList.testPer!=='undefined' && judgmentList.testPer!==undefined"><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;text-align: left">
                            <span style="margin-left: 10px">检验开票人：{{judgmentList.testPer}}</span>
                            <span style="margin-left: 10px">检验开票时间：{{judgmentList.testDate}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary" style="margin-left: 50px" size="mini" @click="judgment(3)">处理</el-button>
                          </div>
                        </div>
                      </el-collapse-item>
                      <el-collapse-item title="追溯判定" name="2">
                        <template v-slot:title>
                          <div style="font-size: 16px">追溯判定<i class="header-icon el-icon-info"></i></div>
                        </template>
                        <div style="margin-left: 40px">
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="fromJudgmentData.inspectorJud!=='' && fromJudgmentData.inspectorJud!==0 && fromJudgmentData.inspectorJud!==undefined" ><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;text-align: left;font-size: 14px">
                            <span style="margin-left: 10px"><span style="font-size: 16px;color: red">检验员</span> 追溯前后5-20件结果：</span>
                            <span style="margin-left: 10px" v-if="fromJudgmentData.inspectorJud==='0'">未追溯；</span>
                            <span style="margin-left: 10px" v-else-if="fromJudgmentData.inspectorJud==='2'" >无异常；</span>
                            <span style="margin-left: 10px" v-else-if="fromJudgmentData.inspectorJud==='1'">有异常；</span>
                            <span style="margin-left: 10px" >追溯人：{{fromJudgmentData.inspectorPer}}；</span>
                            <span style="margin-left: 10px" >追溯日期：{{fromJudgmentData.inspectorDate}}</span>
                          </div>
                          <div style="margin-top: 10px;text-align: left;font-size: 14px">
                            <span style="margin-left: 10px">信息描述：{{fromJudgmentData.inspectorDes}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="fromJud(1)">处理</el-button>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="fromJudgmentData.workshopJud!=='undefined' && fromJudgmentData.workshopJud!==undefined" ><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;text-align: left;font-size: 14px">
                            <span style="margin-left: 10px"><span style="font-size: 16px;color: red">班组长</span> 追溯前后5件结果：</span>
                            <span style="margin-left: 10px" v-if="fromJudgmentData.workshopJud===0">未追溯；</span>
                            <span style="margin-left: 10px" v-else-if="fromJudgmentData.workshopJud===1" >无异常；</span>
                            <span style="margin-left: 10px" v-else-if="fromJudgmentData.workshopJud===2">有异常；</span>
                            <span style="margin-left: 10px" >追溯人：{{fromJudgmentData.workshopPer}}；</span>
                            <span style="margin-left: 10px" >追溯日期：{{fromJudgmentData.workshopDate}}</span>
                          </div>
                          <div style="margin-top: 10px;text-align: left;font-size: 14px">
                            <span style="margin-left: 10px">信息描述：{{fromJudgmentData.workshopDes}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="fromJud(2)">处理</el-button>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="fromJudgmentData.technicianJud!=='undefined' && fromJudgmentData.technicianJud!==undefined" ><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;text-align: left;font-size: 14px">
                            <span style="margin-left: 10px"><span style="font-size: 16px;color: red"> <strong>品技科判定：</strong></span></span>
                            <span style="margin-left: 10px" v-if="fromJudgmentData.technicianJud==='1'">未判定；</span>
                            <span style="margin-left: 10px;color: red" v-if="fromJudgmentData.technicianJud==='2'">需要追溯；</span>
                            <span style="margin-left: 10px;" v-if="fromJudgmentData.technicianJud==='3'">不需要追溯；</span>
                            <span style="margin-left: 10px;">判定人：{{fromJudgmentData.technicianPer}}</span>
                            <span style="margin-left: 10px;">判定时间：{{fromJudgmentData.technicianDate}}</span>
                          </div>
                          <div style="text-align: left;margin-top: 8px;font-size: 14px">
                            <span>判定描述：{{fromJudgmentData.qualityDec}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="fromJud(3)">处理</el-button>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="fromJudgmentData.qualityPer!=='undefined' && fromJudgmentData.qualityPer!==undefined" ><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="text-align: left;font-size: 14px">
                            <span>批准人：{{fromJudgmentData.qualityPer}}</span>
                            <span style="margin-left: 15px">批准时间：{{fromJudgmentData.qualityDate}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="fromJud(4)">处理</el-button>
                          </div>
                        </div>
                      </el-collapse-item>
                      <el-collapse-item title="追溯过程" name="3" v-if="fromJudgmentData.technicianJud==='2'">
                        <template v-slot:title>
                          <div style="font-size: 16px">追溯过程<i class="header-icon el-icon-info"></i></div>
                        </template>
                        <div style="margin-left: 40px">
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="fromProcessData.processNum!=='undefined' && fromProcessData.processNum!==undefined" ><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="color: red"> <strong>责任部门：品技科</strong></span>
                          </div>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px">追溯方案：&nbsp;&nbsp;编号为&nbsp;&nbsp;{{fromProcessData.processNum}};</span>
                            <span style="margin-left: 10px">下发人：&nbsp;&nbsp;{{fromProcessData.processPer}};</span>
                            <span style="margin-left: 10px">下发时间：&nbsp;&nbsp;{{fromProcessData.processDate}};</span>
                            <div style="margin-top: 8px;">
                              <span>需要追溯部门：</span>
                              <el-checkbox-group v-model="fromProCheckList">
                                <el-checkbox label="Assembly workshop" disabled></el-checkbox>
                                <el-checkbox label="Machining workshop" disabled></el-checkbox>
                                <el-checkbox label="Logistics Department" disabled></el-checkbox>
                              </el-checkbox-group>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="fromPro(1)">处理</el-button>
                            </div>
                          </div>
                          <div>
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="fromProcessData.assWorkList!=='undefined' && fromProcessData.assWorkList!==undefined && fromProcessData.assWorkList!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left">
                              <span style="margin-left: 10px;color: red"><strong>责任部门：装配车间</strong></span>
                            </div>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px">追溯记录表编号：{{fromProcessData.assWorkList}};</span>
                              <span style="margin-left: 10px">责任人：{{fromProcessData.assWorkPer}};</span>
                              <span style="margin-left: 10px">完成时间：{{fromProcessData.assWorkDate}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="fromPro(2)">处理</el-button>
                            </div>
                          </div>
                          <div>
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="fromProcessData.macWorkList!=='undefined' && fromProcessData.macWorkList!==undefined && fromProcessData.macWorkList!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"><strong>责任部门：机加车间</strong></span>
                            </div>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px">追溯记录表编号：{{fromProcessData.macWorkList}};</span>
                              <span style="margin-left: 10px">责任人：{{fromProcessData.macWorkPer}};</span>
                              <span style="margin-left: 10px">完成时间：{{fromProcessData.macWorkDate}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="fromPro(3)">处理</el-button>
                            </div>
                          </div>
                          <div>
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="fromProcessData.logDepList!=='undefined' && fromProcessData.logDepList!==undefined && fromProcessData.logDepList!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"><strong>责任部门：物流科</strong></span>
                            </div>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px">追溯记录表编号：{{fromProcessData.logDepList}};</span>
                              <span style="margin-left: 10px">责任人：{{fromProcessData.logDepPer}};</span>
                              <span style="margin-left: 10px">完成时间：{{fromProcessData.logDepDate}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="fromPro(4)">处理</el-button>
                            </div>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="fromProcessData.containNum!=='undefined' && fromProcessData.containNum!==undefined && fromProcessData.containNum!==''"><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"><strong>责任部门：品技科</strong></span>
                          </div>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px">《产品遏制表》编号：{{fromProcessData.containNum}};</span>
                            <span style="margin-left: 10px">责任人：{{fromProcessData.containPer}};</span>
                            <span style="margin-left: 10px">完成时间：{{fromProcessData.containDate}};</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="fromPro(5)">处理</el-button>
                          </div>
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="fromProcessData.reportNum!=='undefined' && fromProcessData.reportNum!==undefined && fromProcessData.reportNum!==''"><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"> <strong>责任部门：品管科</strong></span>
                          </div>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px">《追溯报告》编号：{{fromProcessData.reportNum}};</span>
                            <span style="margin-left: 10px">责任人：{{fromProcessData.reportPer}};</span>
                            <span style="margin-left: 10px">完成时间：{{fromProcessData.reportDate}};</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="fromPro(6)">处理</el-button>
                          </div>
                        </div>
                      </el-collapse-item>
                      <el-collapse-item title="不良评审" name="4">
                        <template v-slot:title>
                          <div style="font-size: 16px">不良评审<i class="header-icon el-icon-info"></i></div>
                        </template>
                        <div style="margin-left: 40px">
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="unqualifiedData.unqualifiedList!=='undefined' && unqualifiedData.unqualifiedList!==undefined && unqualifiedData.unqualifiedList!==''"><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red" v-if="languageS==='chinese'"> <strong><strong>责任部门：{{suspectListShow[0].link.split('/')[0]}}</strong></strong></span>
                            <span style="margin-left: 10px;color: red" v-if="languageS==='english'"> <strong><strong>责任部门：{{suspectListShow[0].link.split('/')[1]}}</strong></strong></span>
                            <span style="margin-left: 10px;color: red" v-if="languageS==='russian'"> <strong><strong>责任部门：{{suspectListShow[0].link.split('/')[2]}}</strong></strong></span>
                          </div>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span>《不合格评评审》编号：{{unqualifiedData.unqualifiedList}};</span>
                            <span style="margin-left: 10px">责任人：{{unqualifiedData.unqualifiedPer}};</span>
                            <span style="margin-left: 10px">完成时间：{{unqualifiedData.unqualifiedDate}};</span>
                          </div>
                          <div style="text-align: left;margin-top: 8px">
                            <span style="margin-right: 10px;font-size: 14px">评审结论：</span>
                            <el-radio-group v-model="unqualifiedData.unqualified">
                              <el-radio :label="'1'" disabled>让步使用</el-radio>
                              <el-radio :label="'2'" disabled>挑选</el-radio>
                              <el-radio :label="'3'" disabled>返工</el-radio>
                            </el-radio-group>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="unqualified(1)">处理</el-button>
                          </div>
                        </div>
                      </el-collapse-item>
                      <el-collapse-item title="不良处理" name="5">
                        <template v-slot:title>
                          <div style="font-size: 16px">不良处理<i class="header-icon el-icon-info"></i></div>
                        </template>
                        <!--要进行显示判断的,是让步接收-->
                        <div v-if="unqualifiedData.unqualified===1 || unqualifiedData.unqualified==='1'">
                          <el-divider>
                            <span style="color: red"><strong>让步接收</strong></span>
                          </el-divider>
                          <div style="margin-left: 40px;font-size: 14px;text-align: left">
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：发起部门</strong></span>
                            </div>
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.compromisePer!=='undefined' && reworkData.compromisePer!==undefined && reworkData.compromisePer!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">责任人：{{reworkData.compromisePer}};</span>
                              <span style="margin-left: 10px">完成时间：{{reworkData.compromiseEndDate}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">装配发动机号：{{reworkData.compromiseEngineNum}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">装配过程描述：{{reworkData.compromiseText}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(1)">处理</el-button>
                            </div>
                          </div>
                        </div>
                        <!--要进行显示判断的,是挑选使用-->
                        <div v-if="unqualifiedData.unqualified===2 || unqualifiedData.unqualified==='2'">
                          <el-divider>
                            <span style="color: red"><strong>挑选使用</strong></span>
                          </el-divider>
                          <div style="margin-left: 40px;font-size: 14px;text-align: left">
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.processTecPer!=='undefined' && reworkData.processTecPer!==undefined && reworkData.processTecPer!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：品技科(标准下发）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">质量异常处置通知单：{{reworkData.processNum}};</span>
                              <span style="margin-left: 10px">挑选通知单编号：{{reworkData.processStandard}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">负责人：{{reworkData.processTecPer}};</span>
                              <span style="margin-left: 10px">完成时间：{{reworkData.processTecDate}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(2)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.processWorkPre!=='undefined' && reworkData.processWorkPre!==undefined && reworkData.processWorkPre!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：发起部门(实施挑选）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">挑选负责人：{{reworkData.processWorkPre}};</span>
                              <span style="margin-left: 10px">挑选完成时间：{{reworkData.processWorkDate}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">挑选结果：{{reworkData.processResult}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(3)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.ticketPer!=='undefined' && reworkData.ticketPer!==undefined && reworkData.ticketPer!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：品管科（不良品监控）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">不良数量：{{reworkData.ticketNmu}};</span>
                              <span style="margin-left: 10px">不良品开票人：{{reworkData.ticketPer}};</span>
                              <span style="margin-left: 10px">挑选完成时间：{{reworkData.ticketDate}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">开票说明：{{reworkData.ticketText}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(4)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.processPer!=='undefined' && reworkData.processPer!==undefined && reworkData.processPer!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：发起部门（挑选品装机）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">责任人：{{reworkData.processPer}};</span>
                              <span style="margin-left: 10px">装机完成时间：{{reworkData.processNumDate}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">发动机号：{{reworkData.processEngineNum}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">装机说明：{{reworkData.processText}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(5)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                          </div>
                        </div>
                        <!--要进行显示判断的,是返工返修-->
                        <div v-if="unqualifiedData.unqualified===3 || unqualifiedData.unqualified==='3'">
                          <el-divider>
                            <span style="color: red"><strong>返工返修</strong></span>
                          </el-divider>
                          <div style="margin-left: 40px;font-size: 14px;text-align: left">
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.workPer!=='undefined' && reworkData.workPer!==undefined && reworkData.workPer!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：品技科(标准下发）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">指导书编号：{{reworkData.workBookNum}};</span>
                              <span style="margin-left: 10px">缺陷清单：{{reworkData.workBookList}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">负责人：{{reworkData.workPer}};</span>
                              <span style="margin-left: 10px">完成时间：{{reworkData.workDate}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(6)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.returnedPer!=='undefined' && reworkData.returnedPer!==undefined && reworkData.returnedPer!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：发起部门(实施返工）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">开始时间：{{reworkData.returnedStartDate}}</span>
                              <span style="margin-left: 10px">完成时间：{{reworkData.returnedDate}};</span>
                              <span style="margin-left: 10px">返修数量：{{reworkData.returnedNum}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">返修负责人：{{reworkData.returnedPer}};</span>
                              <span style="margin-left: 10px">返修记录：{{reworkData.returnedEnd}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">返修结果：{{reworkData.returnedResult}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">返修工时：{{reworkData.returnedTime}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(7)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.testPre!=='undefined' && reworkData.testPre!==undefined && reworkData.testPre!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：品管科（结果确认）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">检验结果是否合格：{{reworkData.testResult}};</span>
                              <span style="margin-left: 10px">判定结论：{{reworkData.testVerdict}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">责任人：{{reworkData.testPre}};</span>
                              <span style="margin-left: 10px">完成时间：{{reworkData.testDate}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(8)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                            <!--一个小包开始-->
                            <el-divider content-position="left">
                              <span style="color: #0269fa" v-if="reworkData.endPer!=='undefined' && reworkData.endPer!==undefined && reworkData.endPer!==''"><strong>{{isEnd}}</strong></span>
                              <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                            </el-divider>
                            <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                              <span style="margin-left: 10px;color: red"> <strong>责任部门：发起部门（返工品装机）</strong></span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">责任人：{{reworkData.endPer}};</span>
                              <span style="margin-left: 10px">装机完成时间：{{reworkData.endDate}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">发动机号：{{reworkData.endEngineId}};</span>
                            </div>
                            <div style="margin-top: 10px">
                              <span style="margin-left: 10px">装机说明：{{reworkData.endText}};</span>
                            </div>
                            <div style="text-align: right">
                              <el-button type="primary"  size="mini" @click="rework(9)">处理</el-button>
                            </div>
                            <!--一个小包结束-->
                          </div>
                        </div>
                      </el-collapse-item>
                      <el-collapse-item title="问题解决" name="6">
                        <template v-slot:title>
                          <div style="font-size: 16px">问题解决<i class="header-icon el-icon-info"></i></div>
                        </template>
                        <div style="margin-left: 40px">
                          <el-divider content-position="left">
                            <span style="color: #0269fa" v-if="reworkData.testPre!=='undefined' && reworkData.testPre!==undefined && reworkData.testPre!==''"><strong>{{isEnd}}</strong></span>
                            <span style="color: red" v-else><strong>{{noEnd}}</strong></span>
                          </el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"> <strong>问题名称：</strong></span><span>{{solveData.issueNames}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="solve(3)">处理</el-button>
                          </div>
                          <el-divider></el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"> <strong>原因分析：</strong></span>
                          </div>
                          <div style="font-size: 14px;text-align: left" v-html="solveData.causeAnalysis">
                          </div>
                          <el-divider></el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"> <strong>整改对策：</strong></span>
                          </div>
                          <div style="font-size: 14px;text-align: left" v-html="solveData.measure"></div>
                          <el-divider></el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"> <strong>改进进展：</strong></span>
                          </div>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left">
                            <span style="margin-left: 10px">切换日期：</span><span style="margin-left: 10px">{{solveData.meaDate}}</span>
                            <span style="margin-left: 10px">切换发动机号：</span><span style="margin-left: 10px">{{solveData.meaEngineId}}</span>
                          </div>
                          <el-divider></el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"> <strong>横展：</strong></span>
                          </div>
                          <div style="font-size: 14px;text-align: left" v-html="solveData.extend"></div>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left">
                            <span style="margin-left: 10px">切换日期：</span><span style="margin-left: 10px">{{solveData.extDate}}</span>
                            <span style="margin-left: 10px">切换发动机号：</span><span style="margin-left: 10px">{{solveData.extEngineId}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="solve(1)">处理</el-button>
                          </div>
                          <el-divider></el-divider>
                          <div style="margin-top: 10px;font-size: 14px;text-align: left" >
                            <span style="margin-left: 10px;color: red"> <strong>是否结题：{{solveData.endIs}}</strong></span>
                            <span style="margin-left: 10px;">结题时间：{{solveData.endDate}}</span>
                            <span style="margin-left: 10px;">判定人：{{solveData.endPer}}</span>
                          </div>
                          <div style="text-align: right">
                            <el-button type="primary"  size="mini" @click="solve(2)">处理</el-button>
                          </div>
                        </div>
                        <!--一个小包结束-->
                      </el-collapse-item>
                    </el-collapse>
                  </div>
                  <div style="border: 1px solid blue; width: 250px;">
                    放不良业务处理流程的信息
                  </div>
                </div>

              </el-tab-pane>
              <el-tab-pane :label="main.listOfSuspiciousProducts" name="fourth">
                <el-table :data="suspectList" border style="width: 100%;overflow-y: auto;overflow-x: auto" height="69vh">
                  <el-table-column label="零部件名称" prop="partName" v-slot:default="scope">
                    <span v-if="languageS==='chinese'">{{scope.row.partName.split('/')[1]}}</span>
                  </el-table-column>
                  <el-table-column label="零部件供方" prop="partSupplier"></el-table-column>
                  <el-table-column label="型号" prop="modelId"></el-table-column>
                  <el-table-column label="发生时间" prop="occurDate"></el-table-column>
                  <el-table-column label="所属部门" prop="link" v-slot:default="scope">
                    <span v-if="languageS==='chinese'">{{scope.row.link.split('/')[0]}}</span>
                    <span v-if="languageS==='english'">{{scope.row.link.split('/')[1]}}</span>
                    <span v-if="languageS==='russian'">{{scope.row.link.split('/')[2]}}</span>
                  </el-table-column>
                  <el-table-column label="发现部门" prop="position"></el-table-column>
                  <el-table-column label="发现人" prop="occurPer"></el-table-column>
                  <el-table-column label="工件号" prop="partId"></el-table-column>
                  <el-table-column label="问题描述" prop="describeUse"></el-table-column>
                  <el-table-column label="发生数量" prop="partNum"></el-table-column>
                  <el-table-column label="可疑品判断" prop="judgment">
                    <el-table-column label="检验判定">
                      <el-table-column label="判定结论"></el-table-column>
                      <el-table-column label="判定人"></el-table-column>
                      <el-table-column label="判定时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="责任部门隔离">
                      <el-table-column label="标识人"></el-table-column>
                      <el-table-column label="标识时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="检验员开票">
                      <el-table-column label="开票人"></el-table-column>
                      <el-table-column label="开票时间"></el-table-column>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="追溯判定" prop="fromJudgment">
                    <el-table-column label="检验员追溯">
                      <el-table-column label="追溯结果"></el-table-column>
                      <el-table-column label="结果描述"></el-table-column>
                      <el-table-column label="追溯人"></el-table-column>
                      <el-table-column label="追溯时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="车间班长追溯">
                      <el-table-column label="追溯结果"></el-table-column>
                      <el-table-column label="结果描述"></el-table-column>
                      <el-table-column label="追溯人"></el-table-column>
                      <el-table-column label="追溯时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="品技判定">
                      <el-table-column label="判定结果"></el-table-column>
                      <el-table-column label="判定描述"></el-table-column>
                      <el-table-column label="判定人"></el-table-column>
                      <el-table-column label="判定时间"></el-table-column>
                      <el-table-column label="批准人"></el-table-column>
                      <el-table-column label="批准时间"></el-table-column>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="追溯过程" prop="fromProcess">
                    <el-table-column label="追溯方案">
                      <el-table-column label="方案编号"></el-table-column>
                      <el-table-column label="下发人"></el-table-column>
                      <el-table-column label="下发时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="装配车间追溯结果">
                      <el-table-column label="追溯记录表编号"></el-table-column>
                      <el-table-column label="追溯人"></el-table-column>
                      <el-table-column label="完成时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="机加车间追溯结果">
                      <el-table-column label="追溯记录表编号"></el-table-column>
                      <el-table-column label="追溯人"></el-table-column>
                      <el-table-column label="完成时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="物流区域追溯结果">
                      <el-table-column label="追溯记录表编号"></el-table-column>
                      <el-table-column label="追溯人"></el-table-column>
                      <el-table-column label="完成时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="追溯报告（含市场追溯结果）">
                      <el-table-column label="追溯记录表编号"></el-table-column>
                      <el-table-column label="追溯人"></el-table-column>
                      <el-table-column label="完成时间"></el-table-column>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="不良品评审" prop="unqualified">
                    <el-table-column label="不合格品评审编号"></el-table-column>
                    <el-table-column label="评审结论"></el-table-column>
                    <el-table-column label="责任人"></el-table-column>
                    <el-table-column label="完成时间"></el-table-column>
                  </el-table-column>
                  <el-table-column label="返工返修" prop="rework">
                    <el-table-column label="品技/制技科（标准下发）">
                      <el-table-column label="指导书编号"></el-table-column>
                      <el-table-column label="缺陷清单"></el-table-column>
                      <el-table-column label="负责人"></el-table-column>
                      <el-table-column label="完成时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="责任部门（实施返工)">
                      <el-table-column label="开始时间"></el-table-column>
                      <el-table-column label="完成时间"></el-table-column>
                      <el-table-column label="返修数量"></el-table-column>
                      <el-table-column label="返修记录"></el-table-column>
                      <el-table-column label="返修结果"></el-table-column>
                      <el-table-column label="返修工时"></el-table-column>
                      <el-table-column label="返修负责人"></el-table-column>
                    </el-table-column>
                    <el-table-column label="品管科（结果确认）">
                      <el-table-column label="检测结果"></el-table-column>
                      <el-table-column label="判定结论"></el-table-column>
                      <el-table-column label="责任人"></el-table-column>
                      <el-table-column label="完成时间"></el-table-column>
                    </el-table-column>
                    <el-table-column label="发起部门（返工品装机）">
                      <el-table-column label="装机完成时间"></el-table-column>
                      <el-table-column label="发动机号"></el-table-column>
                      <el-table-column label="装机说明"></el-table-column>
                      <el-table-column label="责任人"></el-table-column>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="问题解决" prop="solve"></el-table-column>
                  <el-table-column label="编辑人姓名" prop="editName"></el-table-column>
                </el-table>
              </el-tab-pane>
              <el-tab-pane :label="main.reworkAndRepairList" name="second">
                <el-table
                    :data="reworkList"
                    height="69vh"
                    border
                    style="width: 100%">
                  <el-table-column
                      prop="occurDate"
                      label="发生日期">
                  </el-table-column>
                  <el-table-column
                      prop="position"
                      label="发现工序">
                  </el-table-column>
                  <el-table-column
                      prop="modelId"
                      label="机型">
                  </el-table-column>
                  <el-table-column
                      prop="partId"
                      label="工件号">
                  </el-table-column>
                  <el-table-column
                      prop="describeUse"
                      label="问题描述"
                  width="200">
                  </el-table-column>
                  <el-table-column
                      prop="reworkStartDate"
                      label="返修日期">
                  </el-table-column>
                  <el-table-column
                      prop="workBookNum"
                      label="维修方法">
                  </el-table-column>
                  <el-table-column
                      prop="returnedPer"
                      label="维修人">
                  </el-table-column>
                  <el-table-column
                      prop="workNum"
                      label="返工/返修数量">
                  </el-table-column>
                  <el-table-column
                      prop="returnedTime"
                      label="工时">
                  </el-table-column>
                  <el-table-column
                      prop="testResult"
                      label="检验数据">
                  </el-table-column>
                  <el-table-column
                      prop="testVerdict"
                      label="判定结论">
                  </el-table-column>
                  <el-table-column
                      prop="testPre"
                      label="判定人">
                  </el-table-column>
                  <el-table-column
                      prop="workPer"
                      label="确认人">
                  </el-table-column>
                </el-table>
              </el-tab-pane>
              <el-tab-pane :label="main.modelSpecification" name="third">模型说明</el-tab-pane>
            </el-tabs>
          </el-main>
          <el-footer style="height: 8vh">
            <el-button plain size="mini" @click="chooseLanguage('chinese')">中  文</el-button>
            <el-button plain size="mini" @click="chooseLanguage('russian')">Русский язык</el-button>
            <el-button plain size="mini" @click="chooseLanguage('english')">English</el-button>
          </el-footer>
        </el-container>
      </el-container>
    </el-container>

    <!--弹窗放置区-->
    <!--新增一个可疑品信息的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="suspectDialog"
        width="650px"
        :before-close="handleClose">
      <el-form ref="suspectListForm" :inline="true" :model="suspectListForm" label-width="100px">
        <div>
          <el-form-item label="零部件名称">
            <el-select v-model="suspectListForm.partName" filterable clearable placeholder="请选择类别" style="margin-left: 10px;width: 190px">
              <el-option
                  v-for="item in partNameOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="零部件供方">
            <el-input v-model="suspectListForm.partSupplier" style="width: 190px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="零部件型号">
            <el-select v-model="suspectListForm.modelId" filterable clearable placeholder="请选择类别" style="margin-left: 10px;width: 190px">
              <el-option
                  v-for="item in modelIdOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="编号/批次号">
            <el-input v-model="suspectListForm.partId" style="width: 190px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="发生环节">
            <el-select v-model="suspectListForm.link" filterable clearable placeholder="请选择类别" style="margin-left: 10px;width: 190px">
              <el-option
                  v-for="item in linkOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="发现工序" label-width="90px">
            <el-select v-model="suspectListForm.position" filterable clearable placeholder="请选择类别" style="margin-left: 10px;width: 190px">
              <el-option
                  v-for="item in positionOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="发生时间" label-width="100px">
            <el-date-picker
                v-model="suspectListForm.occurDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 200px">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="发现人" label-width="100px">
            <el-input v-model="suspectListForm.occurPer" style="width: 190px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item label="数量" label-width="100px">
            <el-input-number v-model="suspectListForm.partNum" style="width: 200px"></el-input-number>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item label="问题描述" label-width="100px">
            <el-input style="width: 500px"
                      type="textarea"
                      :rows="2"
                      placeholder="请输入内容"
                      v-model="suspectListForm.describeUse"></el-input>
          </el-form-item>
        </div>
        <el-button @click="suspectDialog=false">取 消</el-button>
        <el-button type="primary" @click="suspectEditClick">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--检验员对不良品判断的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="judgmentDialog1"
        width="650px"
        :before-close="handleClose">

      <el-form ref="judgmentListForm" :inline="true" :model="judgmentListForm" label-width="100px">
        <div style="text-align: left">
          <el-form-item label="判定结果">
            <el-radio v-model="judgmentListForm.judgment" label="1">让步使用</el-radio>
            <el-radio v-model="judgmentListForm.judgment" label="2">返工/返修</el-radio>
            <el-radio v-model="judgmentListForm.judgment" label="3">料废</el-radio>
            <el-radio v-model="judgmentListForm.judgment" label="4">工废</el-radio>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="判定时间">
            <el-date-picker
                v-model="judgmentListForm.judgmentDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 200px">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="判定人">
            <el-input v-model="judgmentListForm.judgmentPer" style="width: 190px"></el-input>
          </el-form-item>
        </div>
        <el-button @click="judgmentDialog1=false">取 消</el-button>
        <el-button type="primary" @click="judgmentClick(1)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--车间人员做的标识合格-->
    <el-dialog
        :title="titleUse"
        :visible.sync="judgmentDialog2"
        width="350px"
        :before-close="handleClose">

      <el-form ref="judgmentListForm" :inline="true" :model="judgmentListForm" label-width="100px">
        <div style="text-align: left">
          <el-form-item label="标识人：">
            <el-input v-model="judgmentListForm.judgmentMark" style="width: 190px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="标识时间">
            <el-date-picker
                v-model="judgmentListForm.MarkDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 200px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="judgmentDialog2=false">取 消</el-button>
        <el-button type="primary" @click="judgmentClick(2)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--检验员开票信息的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="judgmentDialog3"
        width="350px"
        :before-close="handleClose">

      <el-form ref="judgmentListForm" :inline="true" :model="judgmentListForm" label-width="100px">
        <div style="text-align: left">
          <el-form-item label="标识人：">
            <el-input v-model="judgmentListForm.testPer" style="width: 190px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="标识时间">
            <el-date-picker
                v-model="judgmentListForm.testDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 200px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="judgmentDialog3=false">取 消</el-button>
        <el-button type="primary" @click="judgmentClick(2)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--检验员追溯信息的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromJudDialog1"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :inline="true" :model="fromJudgmentFrom" label-width="100px">
        <div style="text-align: left">
          <el-form-item label="追溯结果：">
              <el-radio v-model="fromJudgmentFrom.inspectorJud" label="1">未追溯</el-radio>
              <el-radio v-model="fromJudgmentFrom.inspectorJud" label="2">无异常</el-radio>
              <el-radio v-model="fromJudgmentFrom.inspectorJud" label="3">有异常</el-radio>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="追溯人">
            <el-input v-model="fromJudgmentFrom.inspectorPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="追溯时间">
            <el-date-picker
                v-model="fromJudgmentFrom.inspectorDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="结果描述">
            <el-input v-model="fromJudgmentFrom.inspectorDes"
                      style="width: 300px"
                      type="textarea"
                      :rows="2"
                      placeholder="请输入内容"></el-input>
          </el-form-item>
        </div>
        <el-button @click="fromJudDialog1=false">取 消</el-button>
        <el-button type="primary" @click="fromJudClick(1)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--车间班长追溯信息的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromJudDialog2"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :inline="true" :model="fromJudgmentFrom" label-width="100px">
        <div style="text-align: left">
          <el-form-item label="追溯结果：">
            <el-radio v-model="fromJudgmentFrom.workshopJud" label="1">未追溯</el-radio>
            <el-radio v-model="fromJudgmentFrom.workshopJud" label="2">无异常</el-radio>
            <el-radio v-model="fromJudgmentFrom.workshopJud" label="3">有异常</el-radio>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="追溯人">
            <el-input v-model="fromJudgmentFrom.workshopPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="追溯时间">
            <el-date-picker
                v-model="fromJudgmentFrom.workshopDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="结果描述">
            <el-input v-model="fromJudgmentFrom.workshopDes"
                      style="width: 300px"
                      type="textarea"
                      :rows="2"
                      placeholder="请输入内容"></el-input>
          </el-form-item>
        </div>
        <el-button @click="fromJudDialog2=false">取 消</el-button>
        <el-button type="primary" @click="fromJudClick(2)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--技术员判定是否需要追溯的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromJudDialog3"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :inline="true" :model="fromJudgmentFrom" label-width="100px">
        <div style="text-align: left">
          <el-form-item label="判定结果：">
            <el-radio v-model="fromJudgmentFrom.technicianJud" label="1">未确定</el-radio>
            <el-radio v-model="fromJudgmentFrom.technicianJud" label="2">需要追溯</el-radio>
            <el-radio v-model="fromJudgmentFrom.technicianJud" label="3">不需要追溯</el-radio>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="判定人">
            <el-input v-model="fromJudgmentFrom.technicianPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="判定时间">
            <el-date-picker
                v-model="fromJudgmentFrom.technicianDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="结果描述">
            <el-input v-model="fromJudgmentFrom.qualityDec"
                      style="width: 300px"
                      type="textarea"
                      :rows="2"
                      placeholder="请输入内容"></el-input>
          </el-form-item>
        </div>
        <el-button @click="fromJudDialog3=false">取 消</el-button>
        <el-button type="primary" @click="fromJudClick(3)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--品技科长进行批准是否需要追溯的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromJudDialog4"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :inline="true" :model="fromJudgmentFrom" label-width="100px">
        <div style="text-align: left">
        </div>
        <div>
          <el-form-item label="批准人">
            <el-input v-model="fromJudgmentFrom.qualityPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="判定时间">
            <el-date-picker
                v-model="fromJudgmentFrom.qualityDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="fromJudDialog4=false">取 消</el-button>
        <el-button type="primary" @click="fromJudClick(4)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--追溯过程中的追溯方案编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromProDialog1"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="fromProcessFrom" label-width="100px">
        <div>
          <el-form-item label="方案编号">
            <el-input v-model="fromProcessFrom.processNum" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="责任人">
            <el-input v-model="fromProcessFrom.processPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="fromProcessFrom.processDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="横展部门">
            <el-checkbox-group v-model="fromProCheckListFrom">
              <div style="text-align: left">
                <el-checkbox label="Assembly workshop"></el-checkbox>
              </div>
              <div style="text-align: left">
                <el-checkbox label="Machining workshop"></el-checkbox>
              </div>
              <div style="text-align: left">
                <el-checkbox label="Logistics Department"></el-checkbox>
              </div>
            </el-checkbox-group>
          </el-form-item>
        </div>
        <el-button @click="fromProDialog1=false">取 消</el-button>
        <el-button type="primary" @click="fromProClick(1)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--追溯过程中的装配车间追溯结果编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromProDialog2"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="fromProcessFrom" label-width="100px">
        <div>
          <el-form-item label="追溯编号">
            <el-input v-model="fromProcessFrom.assWorkList" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="责任人">
            <el-input v-model="fromProcessFrom.assWorkPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="fromProcessFrom.assWorkDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="fromProDialog2=false">取 消</el-button>
        <el-button type="primary" @click="fromProClick(2)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--追溯过程中的机加车间追溯结果编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromProDialog3"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="fromProcessFrom" label-width="100px">
        <div>
          <el-form-item label="追溯编号">
            <el-input v-model="fromProcessFrom.macWorkList" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="责任人">
            <el-input v-model="fromProcessFrom.macWorkPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="fromProcessFrom.macWorkDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="fromProDialog3=false">取 消</el-button>
        <el-button type="primary" @click="fromProClick(3)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--追溯过程中的物流科追溯结果编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromProDialog4"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="fromProcessFrom" label-width="100px">
        <div>
          <el-form-item label="追溯编号">
            <el-input v-model="fromProcessFrom.logDepList" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="责任人">
            <el-input v-model="fromProcessFrom.logDepPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="fromProcessFrom.logDepDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="fromProDialog4=false">取 消</el-button>
        <el-button type="primary" @click="fromProClick(4)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--追溯过程中的品技科追溯遏制表编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromProDialog5"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="fromProcessFrom" label-width="100px">
        <div>
          <el-form-item label="遏制编号">
            <el-input v-model="fromProcessFrom.containNum" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="责任人">
            <el-input v-model="fromProcessFrom.containPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="fromProcessFrom.containDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="fromProDialog5=false">取 消</el-button>
        <el-button type="primary" @click="fromProClick(5)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--追溯过程中的品管科追溯报告编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="fromProDialog6"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="fromProcessFrom" label-width="100px">
        <div>
          <el-form-item label="遏制编号">
            <el-input v-model="fromProcessFrom.reportNum" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="责任人">
            <el-input v-model="fromProcessFrom.reportPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="fromProcessFrom.reportDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="fromProDialog6=false">取 消</el-button>
        <el-button type="primary" @click="fromProClick(6)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良品评审中的评审结论编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="unqualifiedDialog1"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="unqualifiedFrom" label-width="100px">
        <div>
          <el-form-item label="评审编号">
            <el-input v-model="unqualifiedFrom.unqualifiedList" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="责任人">
            <el-input v-model="unqualifiedFrom.unqualifiedPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="unqualifiedFrom.unqualifiedDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="评审结论">
            <el-radio-group v-model="unqualifiedFrom.unqualified">
              <el-radio :label="1" >让步使用</el-radio>
              <el-radio :label="2">挑选</el-radio>
              <el-radio :label="3" >返工</el-radio>
            </el-radio-group>
          </el-form-item>
        </div>
        <el-button @click="unqualifiedDialog1=false">取 消</el-button>
        <el-button type="primary" @click="unqualifiedClick(1)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的让步接收编辑的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog1"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="责任人">
            <el-input v-model="reworkFrom.compromisePer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.compromiseEndDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="发动机号：">
            <el-input
                v-model="reworkFrom.compromiseEngineNum"
                style="width: 300px"
                type="textarea"
                :rows="2"
                placeholder="请输入内容"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="过程信息：">
            <el-input
                v-model="reworkFrom.compromiseText"
                style="width: 300px"
                type="textarea"
                :rows="2"
                placeholder="请输入内容"></el-input>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog1=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(1)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的挑选-品技下发标准的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog2"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <div style="margin-bottom: 8px;text-align: left">《质量异常处置通知单》</div>
          <el-form-item label="编号">
            <el-input v-model="reworkFrom.processNum" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <div style="margin-bottom: 8px;text-align: left">《挑选标准》</div>
          <el-form-item label="编号">
            <el-input v-model="reworkFrom.processStandard" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.processTecPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.processTecDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog2=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(2)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的挑选-发起部门实施挑选的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog3"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="挑选结果">
            <el-input
                v-model="reworkFrom.processResult"
                style="width: 300px"
                rows="2"
                type="textarea"
                placeholder="请输入内容"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.processWorkPre" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.processWorkDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog3=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(3)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的挑选-品管科处理不良品的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog4"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="开票说明">
            <el-input
                v-model="reworkFrom.ticketText"
                style="width: 300px"
                rows="2"
                type="textarea"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="不良数量">
            <el-input-number
                v-model="reworkFrom.ticketNmu"
                type="textarea"></el-input-number>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.ticketPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.ticketDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog4=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(4)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的挑选-执行部门装机记录的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog5"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="装配发动机号">
            <el-input
                v-model="reworkFrom.processEngineNum"
                style="width: 300px"
                rows="2"
                type="textarea"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="装机说明">
            <el-input
                v-model="reworkFrom.processText"
                type="textarea"
                rows="2"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.processPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.processNumDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog5=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(5)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的返工返修-品技科下发标准的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog6"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="要领书编号">
            <el-input
                v-model="reworkFrom.workBookNum"
                ></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="完善缺陷清单">
            <el-select v-model="reworkFrom.workBookList" placeholder="请选择">
              <el-option
                  v-for="item in workBookListOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.workPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.workDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog6=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(6)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的返工返修-责任部门实施返修的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog7"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="返修结果">
            <el-input
                v-model="reworkFrom.returnedResult"
                type="textarea"
                rows="2"
            ></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="返修记录表">
            <el-select v-model="reworkFrom.returnedEnd" placeholder="请选择" style="width: 300px">
              <el-option
                  v-for="item in workBookListOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="返修数量">
            <el-input-number v-model="reworkFrom.returnedNum" style="width: 300px"></el-input-number>
          </el-form-item>
          <el-form-item label="返修用时">
            <el-input-number v-model="reworkFrom.returnedTime" style="width: 300px"></el-input-number>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.returnedPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="开始时间">
            <el-date-picker
                v-model="reworkFrom.returnedStartDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.returnedDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog7=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(7)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的返工返修-品管实施监控的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog8"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="检验数据">
            <el-select v-model="reworkFrom.testResult" placeholder="请选择">
              <el-option
                  v-for="item in testResultOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="判断结论">
            <el-select v-model="reworkFrom.testVerdict" placeholder="请选择">
              <el-option
                  v-for="item in testVerdictListOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.testPre" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.testDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog8=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(8)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--不良处理中的返工返修-责任部门跟踪装机的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="reworkDialog9"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="reworkFrom" label-width="100px">
        <div>
          <el-form-item label="发动机号">
            <el-input
                v-model="reworkFrom.endEngineId"
                style="width: 300px"
                type="textarea"
                rows="2"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="装机描述">
            <el-input
                v-model="reworkFrom.endText"
                style="width: 300px"
                type="textarea"
                rows="2"></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="负责人">
            <el-input v-model="reworkFrom.endPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="完成时间">
            <el-date-picker
                v-model="reworkFrom.endDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="reworkDialog9=false">取 消</el-button>
        <el-button type="primary" @click="reworkClick(9)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--问题解决-富文本编辑器的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="solveDialog1"
        width="600px"
        :before-close="handleClose">
      <div style="text-align: left;color: red;font-size: 16px;margin-top: 10px">
        <strong>原因分析:</strong>
      </div>
      <div ref="editorContainer" style="text-align: left;margin-top: 10px;"></div>
      <div style="text-align: left;color: red;font-size: 16px;margin-top: 10px">
        <strong>整改对策:</strong>
      </div>
      <div ref="editorContainer1" style="text-align: left;margin-top: 10px;"></div>
      <div style="margin-top: 10px">
        <el-form ref="fromJudgmentFrom" :inline="true" :model="solveFrom" label-width="100px">
          <el-form-item label="完成时间：">
            <el-date-picker
                v-model="solveFrom.meaDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 160px">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="切换发动机号：" label-width="110">
            <el-input v-model="solveFrom.meaEngineId" style="width: 170px"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div style="text-align: left;color: red;font-size: 16px;margin-top: 10px">
        <strong>横展:</strong>
      </div>
      <div ref="editorContainer2" style="text-align: left;margin-top: 10px;"></div>
      <div style="margin-top: 10px">
        <el-form ref="fromJudgmentFrom" :inline="true" :model="solveFrom" label-width="100px">
          <el-form-item label="完成时间：">
            <el-date-picker
                v-model="solveFrom.extDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 160px">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="切换发动机号：" label-width="110">
            <el-input v-model="solveFrom.extEngineId" style="width: 170px"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div>
    <el-button @click="solveDialog1 = false">取 消</el-button>
    <el-button type="primary" @click="solveClick(1)">确 定</el-button>
  </div>
    </el-dialog>
    <!--问题解决-品管科判断是否可结题-->
    <el-dialog
        :title="titleUse"
        :visible.sync="solveDialog2"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="solveFrom" label-width="100px">
        <div>
          <el-form-item label="是否结题">
            <el-select v-model="solveFrom.endIs" placeholder="请选择">
              <el-option
                  v-for="item in endIsOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="判定人">
            <el-input v-model="solveFrom.endPer" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: right">
          <el-form-item label="结题时间">
            <el-date-picker
                v-model="solveFrom.endDate"
                type="date"
                placeholder="选择日期"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                style="width: 300px">
            </el-date-picker>
          </el-form-item>
        </div>
        <el-button @click="solveDialog2=false">取 消</el-button>
        <el-button type="primary" @click="solveClick(2)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--问题解决-写入问题名称-->
    <el-dialog
        :title="titleUse"
        :visible.sync="solveDialog3"
        width="450px"
        :before-close="handleClose">

      <el-form ref="fromJudgmentFrom" :model="solveFrom" label-width="100px">
        <div>
          <el-form-item label="问题名称">
            <el-input v-model="solveFrom.issueNames" style="width: 300px"></el-input>
          </el-form-item>
        </div>
        <el-button @click="solveDialog3=false">取 消</el-button>
        <el-button type="primary" @click="solveClick(2)">确 定</el-button>
      </el-form>
    </el-dialog>
    <!--抽屉放置区域-->
  </div>
</template>

<script>
import {
  departmentOptions,
  opList,
  partListOptions,
} from "@/configUse";
import _, {toInteger} from "lodash";
import E from "wangeditor";

export default {
  name: "suspectProduct",
  components: {},
  data() {
    return {
      activeName:'first',
      //用户权限相关的变量
      useName:'',//用户名称
      useId:'',//用户编号
      usePower:'',//用户权限

      radio:1,
      //记录是否完成或者是否需要的
      workBookListOptions:[
        {value:'已完成',label:'已完成'},
        {value:'不需要',label:'不需要'}
      ],
      //记录数据是否正确的
      testResultOptions:[
        {value:'数据正确',label:'数据正确'},
        {value:'数据不正确',label:'数据不正确'}
      ],
      //记录是否合格的
      testVerdictListOptions:[
        {value:'合格',label:'合格'},
        {value:'不合格',label:'不合格'}
      ],
      //记录是否结题
      endIsOptions:[
        {value:'未结题',label:'未结题'},
        {value:'结题',label:'结题'}
      ],

      fromProCheckList: [],
      //追溯过程中的表单显示的对选框
      fromProCheckListFrom:[],

      //记录语言的变量
      languageS:'chinese',
      main:{
        qualityManagementSystem:'俄动力质量管理系统',
        suspiciousProduct:'可疑品业务',
        assemblyWorkshop:'装配车间可疑品',
        machiningWorkshop:'机加车间可疑品',
        logistics:'物流科可疑品',
        suspiciousProductHandling:'可疑品处理',
        listOfSuspiciousProducts:'可疑品清单',
        reworkAndRepairList:'返工返修清单',
        modelSpecification:'模型说明',
        listOfSuspectedItems:'可疑品清单台账目录',
        partName:'零部件名称',
        occurDate:'发生日期'
      },

      //DOM元素用到的常量
      //表示已完成
      isEnd:'已完成',
      //表示未完成
      noEnd:'未完成',

      //业务流程的展示变量
      productNames:['0'],
      //可疑品大表
      suspectList:[{
        //主键
        id:0,
        //零部件名称
        partName:'燃油进水管',
        //零部件供方
        partSupplier:'',
        //型号
        modelId:'',
        //发生时间
        occurDate:'',
        //发送环节
        link:'',
        //发现环节
        position:'',
        //发现人
        occurPer:'',
        //工件号
        partId:'',
        //问题描述
        describeUse:'',
        //发生数量
        partNum:'',
        //可疑品判断
        judgment:'',
        //追溯判定
        fromJudgment:'',
        //追溯过程
        fromProcess:'',
        //不良品评审
        unqualified:'',
        //返工返修
        rework:'',
        //问题解决
        solve:'',
        //删除标记位
        deleteSign:'',
        //创建时间
        establishTime:'',
        //修改时间
        updateTime:'',
        //编辑人姓名
        editName:'',
      }],
      //可疑品大表用到的点击编辑变量：1.增加一条；2.修改；3：删除
      suspectDoe:null,
      //可疑品大表用到的点击行信息，Scope格式
      suspectScope:null,
      suspectListShow:[{
        //主键
        id:0,
        //零部件名称
        partName:'燃油进水管',
        //零部件供方
        partSupplier:'',
        //型号
        modelId:'',
        //发生时间
        occurDate:'',
        //发送环节
        link:'',
        //发现环节
        position:'',
        //发现人
        occurPer:'',
        //工件号
        partId:'',
        //问题描述
        describeUse:'',
        //发生数量
        partNum:'',
        //可疑品判断
        judgment:'',
        //追溯判定
        fromJudgment:'',
        //追溯过程
        fromProcess:'',
        //不良品处理
        unqualified:'',
        //返工返修
        rework:'',
        //问题解决
        solve:'',
        //删除标记位
        deleteSign:'',
        //创建时间
        establishTime:'',
        //修改时间
        updateTime:'',
        //编辑人姓名
        editName:'',
      }],
      suspectListForm:{
        //主键
        id:0,
        //零部件名称
        partName:'',
        //零部件供方
        partSupplier:'',
        //型号
        modelId:'',
        //发生时间
        occurDate:'',
        //发送环节
        link:'',
        //发现环节
        position:'',
        //发现人
        occurPer:'',
        //工件号
        partId:'',
        //问题描述
        describeUse:'暂无描述信息',
        //发生数量
        partNum:'',
        //可疑品判断
        judgment:'0/暂无判定人/无日期',
        //追溯判定
        fromJudgment:'',
        //追溯过程
        fromProcess:'',
        //不良品处理
        unqualified:'',
        //返工返修
        rework:'',
        //问题解决
        solve:'',
        //删除标记位
        deleteSign:'',
        //创建时间
        establishTime:'',
        //修改时间
        updateTime:'',
        //编辑人姓名
        editName:'',
      },

      //可疑品判断用到的变量
      //总数据，用到的是一个对象，不会是一个数组
      judgmentList:{
        //判断结果
        judgment:'2',//0暂未判定；1.让步使用；2.返工返修；3.工废；4.料废
        //判定人
        judgmentPer:'暂无',
        //判定时间
        judgmentDate:'暂无',
        //预留
        judgment1:'',
        //预留
        judgment2:'',
        //预留
        judgment3:'',

        //标识人
        judgmentMark:'',
        //标识时间
        MarkDate:'',
        //预留
        Mark1:'',
        //预留
        Mark2:'',
        //预留
        Mark3:'',

        //检验复核
        testPer:'',
        //检验复核时间
        testDate:'',
        //预留
        test1:'',
        // 预留
        test2:'',
        // 预留
        test3:'',
      },
      //可疑品判定中的用户操作内容：1.代表检验员判定。
      judgmentDoe:0,
      //可疑品判定用到的窗口编辑数据
      judgmentListForm:{
        //判断结果
        judgment:'2',//0暂未判定；1.让步使用；2.返工返修；3.工废；4.料废
        //判定人
        judgmentPer:'暂无',
        //判定时间
        judgmentDate:'暂无',
        //预留
        judgment1:'',
        //预留
        judgment2:'',
        //预留
        judgment3:'',

        //标识人
        judgmentMark:'',
        //标识时间
        MarkDate:'',
        //预留
        Mark1:'',
        //预留
        Mark2:'',
        //预留
        Mark3:'',

        //检验复核
        testPer:'',
        //检验复核时间
        testDate:'',
        //预留
        test1:'',
        // 预留
        test2:'',
        // 预留
        test3:'',
      },

      //追溯判定用到的变量
      //总数据，用到的是一个对象，不会是一个数组
      //显示用数据
      fromJudgmentData:{
        // 检验员追溯结果
        inspectorJud:'0',//0:没有追溯；1：无异常；2：有异常
        // 异常描述
        inspectorDes:'',
        // 追溯人
        inspectorPer:'',
        // 追溯日期
        inspectorDate:'',
        // 上传信息时间
        inspectorEditDate:'',
        //编辑人
        editName:'',
        // 预留
        inspector1:'',
        // 预留
        inspector2:'',
        // 预留
        inspector3:'',
        // 车间追溯结果
        workshopJud:0,//0:没有追溯；1：无异常；2：有异常
        // 异常描述
        workshopDes:'',
        // 追溯人
        workshopPer:'',
        // 追溯日期
        workshopDate:'',
        // 上传信息时间
        workshopEditDate:'',
        //车间信息上传人
        workshopEditName:'',
        // 预留
        workshop1:'',
        // 预留
        workshop2:'',
        // 预留
        workshop3:'',
        //负责人判定判定信息
        technicianJud:'',
        //判定日期-时间
        technicianDate:'',
        //判断人
        technicianPer:'',
        //编辑人
        technicianEditName:'',
        //编辑时间
        technicianEditDate:'',
        //预留
        technician1:'',
        //预留
        technician2:'',
        //预留
        technician3:'',
        //追溯描述
        qualityDec:'',
        //科长批准
        qualityJud:1,//0代表没有出具意见；1：追溯；2：不追溯
        //批准日期
        qualityDate:'',
        //批准人
        qualityPer:'',
        //编辑人
        qualityEditName:'',
        //编辑日期
        qualityEditDate:'',
        // 预留
        quality1:'',
        // 预留
        quality2:'',
        // 预留
        quality3:'',
      },
      //编辑窗口用数据
      fromJudgmentFrom:{
        // 检验员追溯结果
        inspectorJud:'0',//0:没有追溯；1：无异常；2：有异常
        // 异常描述
        inspectorDes:'',
        // 追溯人
        inspectorPer:'',
        // 追溯日期
        inspectorDate:'',
        // 上传信息时间
        inspectorEditDate:'',
        //编辑人
        editName:'',
        // 预留
        inspector1:'',
        // 预留
        inspector2:'',
        // 预留
        inspector3:'',
        // 车间追溯结果
        workshopJud:0,//0:没有追溯；1：无异常；2：有异常
        // 异常描述
        workshopDes:'',
        // 追溯人
        workshopPer:'',
        // 追溯日期
        workshopDate:'',
        // 上传信息时间
        workshopEditDate:'',
        //车间信息上传人
        workshopEditName:'',
        // 预留
        workshop1:'',
        // 预留
        workshop2:'',
        // 预留
        workshop3:'',
        //负责人判定判定信息
        technicianJud:'',
        //判定日期-时间
        technicianDate:'',
        //判断人
        technicianPer:'',
        //编辑人
        technicianEditName:'',
        //编辑时间
        technicianEditDate:'',
        //预留
        technician1:'',
        //预留
        technician2:'',
        //预留
        technician3:'',
        //追溯描述
        qualityDec:'',
        //科长批准
        qualityJud:1,//0代表没有出具意见；1：追溯；2：不追溯
        //批准日期
        qualityDate:'',
        //批准人
        qualityPer:'',
        //编辑人
        qualityEditName:'',
        //编辑日期
        qualityEditDate:'',
        // 预留
        quality1:'',
        // 预留
        quality2:'',
        // 预留
        quality3:'',
      },
      //追溯判定用到的点击变量
      fromJubDoe:0,

      //追溯过程用到的变量
      //总数据，用到的是一个对象，不会是一个数组
      fromProcessData:{
        //追溯方案编号
        processNum:'',
        //追溯方案下发人
        processPer:'',
        //下发时间
        processDate:'',
        //需要开展追溯的部门
        suspectList:'',
        //编辑时间
        processEditDate:'',
        //上传人
        processEditName:'',
        //预留
        process1:'',
        //预留
        process2:'',
        //预留
        process3:'',
        //需要输出过程追溯记录表的部门：装配车间
        assWork:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        assWorkList:'',
        //责任人
        assWorkPer:'',
        //完成时间
        assWorkDate:'',
        //编辑人
        assWorkEditName:'',
        //编辑时间
        assWorkEditDate:'',
        //预留
        assWork1:'',
        //预留
        assWork2:'',
        //预留
        assWork3:'',
        //需要输出过程追溯记录表的部门：机加车间
        macWork:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        macWorkList:'',
        //责任人
        macWorkPer:'',
        //完成时间
        macWorkDate:'',
        //编辑人
        macWorkEditName:'',
        //编辑时间
        macWorkEditDate:'',
        //预留
        macWork1:'',
        //预留
        macWork2:'',
        //预留
        macWork3:'',
        //需要输出过程追溯记录表的部门：物流科
        logDep:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        logDepList:'',
        //责任人
        logDepPer:'',
        //完成时间
        logDepDate:'',
        //编辑人
        logDepEditName:'',
        //编辑时间
        logDepEditDate:'',
        //预留
        logDep1:'',
        //预留
        logDep2:'',
        //预留
        logDep3:'',
        //需要输出过程追溯记录表的部门：品技科
        tecDep:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        tecDepList:'',
        //责任人
        tecDepPer:'',
        //完成时间
        tecDepDate:'',
        //编辑人
        tecDepEditName:'',
        //编辑时间
        tecDepEditDate:'',
        //预留
        tecDep1:'',
        //预留
        tecDep2:'',
        //预留
        tecDep3:'',
        //产品遏制表编号（品技）
        containNum:'',
        //责任人
        containPer:'',
        //完成时间
        containDate:'',
        //编辑人
        containEditName:'',
        //编辑时间
        containEditDate:'',
        //预留
        contain1:'',
        //预留
        contain2:'',
        //预留
        contain3:'',
        //品管出具
        //追溯报告编号
        reportNum:'',
        //责任人
        reportPer:'',
        //完成时间
        reportDate:'',
        //编辑人
        reportEditName:'',
        //编辑时间
        reportEditDate:'',
        //预留
        report1:'',
        //预留
        report2:'',
        //预留
        report3:'',
      },
      //编辑窗口用数据
      fromProcessFrom:{
        //追溯方案编号
        processNum:'',
        //追溯方案下发人
        processPer:'',
        //下发时间
        processDate:'',
        //需要开展追溯的部门
        suspectList:'',
        //编辑时间
        processEditDate:'',
        //上传人
        processEditName:'',
        //预留
        process1:'',
        //预留
        process2:'',
        //预留
        process3:'',
        //需要输出过程追溯记录表的部门：装配车间
        assWork:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        assWorkList:'',
        //责任人
        assWorkPer:'',
        //完成时间
        assWorkDate:'',
        //编辑人
        assWorkEditName:'',
        //编辑时间
        assWorkEditDate:'',
        //预留
        assWork1:'',
        //预留
        assWork2:'',
        //预留
        assWork3:'',
        //需要输出过程追溯记录表的部门：机加车间
        macWork:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        macWorkList:'',
        //责任人
        macWorkPer:'',
        //完成时间
        macWorkDate:'',
        //编辑人
        macWorkEditName:'',
        //编辑时间
        macWorkEditDate:'',
        //预留
        macWork1:'',
        //预留
        macWork2:'',
        //预留
        macWork3:'',
        //需要输出过程追溯记录表的部门：物流科
        logDep:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        logDepList:'',
        //责任人
        logDepPer:'',
        //完成时间
        logDepDate:'',
        //编辑人
        logDepEditName:'',
        //编辑时间
        logDepEditDate:'',
        //预留
        logDep1:'',
        //预留
        logDep2:'',
        //预留
        logDep3:'',
        //需要输出过程追溯记录表的部门：品技科
        tecDep:1,//0代表不需要；1代表需要；
        //产品过程追溯记录表编号
        tecDepList:'',
        //责任人
        tecDepPer:'',
        //完成时间
        tecDepDate:'',
        //编辑人
        tecDepEditName:'',
        //编辑时间
        tecDepEditDate:'',
        //预留
        tecDep1:'',
        //预留
        tecDep2:'',
        //预留
        tecDep3:'',
        //产品遏制表编号（品技）
        containNum:'',
        //责任人
        containPer:'',
        //完成时间
        containDate:'',
        //编辑人
        containEditName:'',
        //编辑时间
        containEditDate:'',
        //预留
        contain1:'',
        //预留
        contain2:'',
        //预留
        contain3:'',
        //品管出具
        //追溯报告编号
        reportNum:'',
        //责任人
        reportPer:'',
        //完成时间
        reportDate:'',
        //编辑人
        reportEditName:'',
        //编辑时间
        reportEditDate:'',
        //预留
        report1:'',
        //预留
        report2:'',
        //预留
        report3:'',
      },
      //追溯过程用到的点击变量
      fromProDoe:0,


      //不良品评审用到的变量
      //总数据，用到的是一个对象，不会是一个数组
      unqualifiedData:{
        //不良品评审编号
        unqualifiedList:'',
        //不良品评审意见
        unqualified:0,//1:让步接收；2.挑选；3：返工返修；
        //负责人
        unqualifiedPer:'',
        //完成时间
        unqualifiedDate:'',
        //编辑人
        unqualifiedEditName:'',
        //编辑时间
        unqualifiedEditDate:'',
        //预留
        unqualified1:'',
        //预留
        unqualified2:'',
        //预留
        unqualified3:'',
      },
      //编辑窗口用数据
      unqualifiedFrom:{
        //不良品评审编号
        unqualifiedList:'',
        //不良品评审意见
        unqualified:'',//1:让步接收；2.挑选；3：返工返修；
        //负责人
        unqualifiedPer:'',
        //完成时间
        unqualifiedDate:'',
        //编辑人
        unqualifiedEditName:'',
        //编辑时间
        unqualifiedEditDate:'',
        //预留
        unqualified1:'',
        //预留
        unqualified2:'',
        //预留
        unqualified3:'',
      },
      //不良品评审到的点击变量
      unqualifiedDoe:0,

      //不良品处理用到的变量
      //显示大表
      reworkData:{
        //让步接收相关
        //记录装机完成时间
        compromiseEndDate:'',
        //记录装配发动机号（文本框，可以写一段文字）
        compromiseEngineNum:'',
        //装配信息
        compromiseText:'',
        //记录负责人
        compromisePer:'',
        //记录编辑人
        compromiseEditName:'',
        //记录编辑时间
        compromiseDate:'',
        // 预留
        compromise1:'',
        // 预留
        compromise2:'',
        //预留
        compromise3:'',
        //记录挑选相关的内容
        //《质量异常处理通知单》编号
        processNum:'',
        //挑选标准
        processStandard:'',
        //负责人
        processTecPer:'',
        //完成时间
        processTecDate:'',
        //编辑人
        processEditName:'',
        //编辑时间
        processEditDate:'',
        //预留
        processTec1:'',
        //预留
        processTec2:'',
        // 预留
        processTec3:'',
        //挑选结果
        processResult:'',
        //挑选负责人
        processWorkPre:'',
        //挑选完成时间
        processWorkDate:'',
        //编辑人
        processWorkEditName:'',
        //编辑完成时间
        processWorkEditDate:'',
        //预留
        processWork1:'',
        //预留
        processWork2:'',
        //预留
        processWork3:'',
        //不合格品标记/开票，检验处理信息
        //开票说明
        ticketText:'',
        //开票负责人
        ticketPer:'',
        //开票完成时间
        ticketDate:'',
        //不良品数量：
        ticketNmu:'',
        //编辑人
        ticketEditName:'',
        //编辑时间
        ticketEditDate:'',
        //预留
        ticket1:'',
        //预留
        ticket2:'',
        //预留
        ticket3:'',
        //挑选产品装机记录
        processEngineNum:'',
        //装机日期
        processNumDate:'',
        //装机说明
        processText:'',
        //责任人
        processPer:'',
        //编辑人
        processNumEditName:'',
        //编辑时间
        processNumEditDate:'',
        //预留
        process1:'',
        //预留
        process2:'',
        //预留
        process3:'',
        //返工返修要领书相关的变量
        //返工返修指导书编号
        workBookNum:'',
        //完善缺陷清单
        workBookList:'',
        //责任人
        workPer:'',
        //完成时间
        workDate:'',
        //编辑人
        workEditName:'',
        //编辑时间
        workEditDate:'',
        //预留
        work1:'',
        //预留
        work2:'',
        //预留
        work3:'',

        //返修过程相关
        //返修开始时间
        returnedStartDate:'',
        //返修数量
        returnedNum:'',
        //返修数量
        //返修完成时间
        returnedDate:'',
        //返修负责人
        returnedPer:'',
        //返修结果描述
        returnedResult:'',
        //返工返修记录表完成
        returnedEnd:'',
        //返工返修所用时间
        returnedTime:'',
        //编辑人
        returnedEditName:'',
        //编辑时间
        //预留
        returned1:'',
        //预留
        returned2:'',
        //预留
        returned3:'',

        //检验确认相关
        //检验数据是否合格
        testResult:'',
        //判定结论
        testVerdict:'',
        //判定人
        testPre:'',
        //判定时间
        testDate:'',
        //编辑人
        testEditName:'',
        //编辑时间
        testEditDate:'',
        // 预留
        test1:'',
        // 预留
        test2:'',
        //预留
        test3:'',

        //品技确认相关

        // 确认人
        tecPer:'',
        // 确认时间
        tecDate:'',
        // 确认结果
        tecResult:'',
        // 编辑人
        tecEditName:'',
        // 编辑时间
        tecEditDate:'',
        // 预留
        tec1:'',
        // 预留
        tec2:'',
        // 预留
        tec3:'',

        //再次装机相关
        //装机时间
        endDate:'',
        //发动机号
        endEngineId:'',
        //负责人
        endPer:'',
        //装机描述
        endText:'',
        // 编辑时间
        endEditDate:'',
        // 编辑人
        endEditPer:'',
        // 预留
        end1:'',
        // 预留
        end2:'',
        // 预留
        end3:'',
      },
      //编辑用表
      reworkFrom:{
        //让步接收相关
        //记录装机完成时间
        compromiseEndDate:'',
        //记录装配发动机号（文本框，可以写一段文字）
        compromiseEngineNum:'',
        //装配信息
        compromiseText:'',
        //记录负责人
        compromisePer:'',
        //记录编辑人
        compromiseEditName:'',
        //记录编辑时间
        compromiseDate:'',
        // 预留
        compromise1:'',
        // 预留
        compromise2:'',
        //预留
        compromise3:'',
        //记录挑选相关的内容
        //《质量异常处理通知单》编号
        processNum:'',
        //挑选标准
        processStandard:'',
        //负责人
        processTecPer:'',
        //完成时间
        processTecDate:'',
        //编辑人
        processEditName:'',
        //编辑时间
        processEditDate:'',
        //预留
        processTec1:'',
        //预留
        processTec2:'',
        // 预留
        processTec3:'',
        //挑选结果
        processResult:'',
        //挑选负责人
        processWorkPre:'',
        //挑选完成时间
        processWorkDate:'',
        //编辑人
        processWorkEditName:'',
        //编辑完成时间
        processWorkEditDate:'',
        //预留
        processWork1:'',
        //预留
        processWork2:'',
        //预留
        processWork3:'',
        //不合格品标记/开票，检验处理信息
        //开票说明
        ticketText:'',
        //开票负责人
        ticketPer:'',
        //开票完成时间
        ticketDate:'',
        //不良品数量：
        ticketNmu:'',
        //编辑人
        ticketEditName:'',
        //编辑时间
        ticketEditDate:'',
        //预留
        ticket1:'',
        //预留
        ticket2:'',
        //预留
        ticket3:'',
        //挑选产品装机记录
        processEngineNum:'',
        //装机日期
        processNumDate:'',
        //装机说明
        processText:'',
        //责任人
        processPer:'',
        //编辑人
        processNumEditName:'',
        //编辑时间
        processNumEditDate:'',
        //预留
        process1:'',
        //预留
        process2:'',
        //预留
        process3:'',
        //返工返修要领书相关的变量
        //返工返修指导书编号
        workBookNum:'',
        //完善缺陷清单
        workBookList:'',
        //责任人
        workPer:'',
        //完成时间
        workDate:'',
        //编辑人
        workEditName:'',
        //编辑时间
        workEditDate:'',
        //预留
        work1:'',
        //预留
        work2:'',
        //预留
        work3:'',

        //返修过程相关
        //返修开始时间
        returnedStartDate:'',
        //返修数量
        returnedNum:'',
        //返修数量
        //返修完成时间
        returnedDate:'',
        //返修负责人
        returnedPer:'',
        //返修结果描述
        returnedResult:'',
        //返工返修记录表完成
        returnedEnd:'',
        //返工返修所用时间
        returnedTime:'',
        //编辑人
        returnedEditName:'',
        //编辑时间
        //预留
        returned1:'',
        //预留
        returned2:'',
        //预留
        returned3:'',

        //检验确认相关
        //检验数据是否合格
        testResult:'',
        //判定结论
        testVerdict:'',
        //判定人
        testPre:'',
        //判定时间
        testDate:'',
        //编辑人
        testEditName:'',
        //编辑时间
        testEditDate:'',
        // 预留
        test1:'',
        // 预留
        test2:'',
        //预留
        test3:'',

        //品技确认相关

        // 确认人
        tecPer:'',
        // 确认时间
        tecDate:'',
        // 确认结果
        tecResult:'',
        // 编辑人
        tecEditName:'',
        // 编辑时间
        tecEditDate:'',
        // 预留
        tec1:'',
        // 预留
        tec2:'',
        // 预留
        tec3:'',

        //再次装机相关
        //装机时间
        endDate:'',
        //发动机号
        endEngineId:'',
        //负责人
        endPer:'',
        //装机描述
        endText:'',
        // 编辑时间
        endEditDate:'',
        // 编辑人
        endEditPer:'',
        // 预留
        end1:'',
        // 预留
        end2:'',
        // 预留
        end3:'',
      },
      //点击函数
      reworkDoe:0,


      //问题解决过程用到的变量
      //显示大表
      solveData:{
        // 问题名称
        issueNames:'',
        //问题名称编辑人
        nameEditName:'',
        //问题名称编辑时间
        nameEditDate:'',
        //预留
        name1:'',
        //预留
        name2:'',
        //预留
        name3:'',
        //原因分析
        causeAnalysis:'',
        //整改对策
        measure:'',
        //整改对策完成时间
        meaDate:'',
        //整改对策实施切换发动机号/零部件号
        meaEngineId:'',
        //横展内容
        extend:'',
        //横展完成时间
        extDate:'',
        //横展实施切换发动机号
        extEngineId:'',
        //编辑人
        issEditName:'',
        //编辑时间
        issEditDate:'',
        //预留
        iss1:'',
        //预留
        iss2:'',
        //预留
        iss3:'',

        //结题状态
        endIs:'',
        //结题完成时间
        endDate:'',
        //结题判定人
        endPer:'',
        //结题编辑人
        endEditName:'',
        //编辑时间
        endEditDate:'',
        //预留
        end1:'',
        //预留
        end2:'',
        //预留
        end3:'',
      },
      //编辑用表
      solveFrom:{
        // 问题名称
        issueNames:'',
        //问题名称编辑人
        nameEditName:'',
        //问题名称编辑时间
        nameEditDate:'',
        //预留
        name1:'',
        //预留
        name2:'',
        //预留
        name3:'',
        //原因分析
        causeAnalysis:'',
        //整改对策
        measure:'',
        //整改对策完成时间
        meaDate:'',
        //整改对策实施切换发动机号/零部件号
        meaEngineId:'',
        //横展内容
        extend:'',
        //横展完成时间
        extDate:'',
        //横展实施切换发动机号
        extEngineId:'',
        //编辑人
        issEditName:'',
        //编辑时间
        issEditDate:'',
        //预留
        iss1:'',
        //预留
        iss2:'',
        //预留
        iss3:'',

        //结题状态
        endIs:'',
        //结题完成时间
        endDate:'',
        //结题判定人
        endPer:'',
        //结题编辑人
        endEditName:'',
        //编辑时间
        endEditDate:'',
        //预留
        end1:'',
        //预留
        end2:'',
        //预留
        end3:'',
      },
      //点击函数
      solveDoe:0,

      //返工返修清单上的变量
      reworkList:[
        {//发生日期
          occurDate:'',
        //发现工序
          position:'',
        //机型
          modelId:'',
        //发动机号/零部件名称
          partId:'',
        //问题描述
          describeUse:'',
        //返工/返修日期
          reworkStartDate:'',
        //维修方法及更换零部件（注明批次厂家）明细
          workBookNum:'',
        //维修人
          returnedPer:'',
        //返工返修数量
          workNum:'',
        //返工、返修工时
          returnedTime:'',
        //检验数据
          testResult:'',
        //判定结论
          testVerdict:'',
        //判定人
          testPre:'',
        //确认人
          workPer:'',
        }
      ],


      //弹窗用到的变量
      //控制新增一个可疑品信息的弹窗打开
      suspectDialog:false,
      //检验员对可疑品判定的弹窗
      judgmentDialog1:false,
      //车间对标识、隔离进行的操作弹窗
      judgmentDialog2:false,
      //检验员开票情况的弹窗的弹窗
      judgmentDialog3:false,
      //检验员追溯前后5件的记录的弹窗
      fromJudDialog1:false,
      //车间班长追溯前后5件的记录的弹窗
      fromJudDialog2:false,
      //记录技术人员判定的结果的弹窗
      fromJudDialog3:false,
      //记录技术科长判定结果的弹窗
      fromJudDialog4:false,
      //记录追溯过程中的追溯方案下发的弹窗；
      fromProDialog1:false,
      //记录追溯过程中的装配车间追溯结果的弹窗；
      fromProDialog2:false,
      //记录追溯过程中的机加车间追溯结果的弹窗；
      fromProDialog3:false,
      //记录追溯过程中的物流科追溯结果的弹窗；
      fromProDialog4:false,
      //记录追溯过程中的品技科追溯遏制表的弹窗；
      fromProDialog5:false,
      //记录追溯过程中的品管科追溯报告的弹窗；
      fromProDialog6:false,
      //记录不良品评审的弹窗；
      unqualifiedDialog1:false,
      //记录不良品处理过程中的让步接收
      reworkDialog1:false,
      //记录不良品处理-挑选-过程中的品技下发标准的弹窗
      reworkDialog2:false,
      //记录不良品处理-挑选-过程中的执行部门进行挑选的弹窗
      reworkDialog3:false,
      //记录不良品处理-挑选-过程中的检验部门进行确认的弹窗
      reworkDialog4:false,
      //记录不良品处理-挑选-过程中的执行部门进行确认的弹窗
      reworkDialog5:false,
      //记录不良品处理-返工返修-品技科下发标准的弹窗
      reworkDialog6:false,
      //记录不良品处理-返工返修-责任部门实施返修的弹窗
      reworkDialog7:false,
      //记录不良品处理-返工返修-品管实施监控的的弹窗
      reworkDialog8:false,
      //记录不良品处理-返工返修-责任部门装机跟踪的弹窗
      reworkDialog9:false,
      //问题解决对策的弹窗
      solveDialog1:false,
      //判断问题是否可以结题
      solveDialog2:false,
      //填入问题名称
      solveDialog3:false,
      //弹窗表头提示
      titleUse:'提示',

      //零部件名称的选择列表
      partNameOptions:partListOptions,
      //适用机型的选择列表
      modelIdOptions:[
        {value:'EB/EN',label:'EB/EN'},
        {value:'EB全系',label:'EB全系'},
        {value:'EN全系',label:'EN全系'},
        {value:'EB05',label:'EB05'},
        {value:'EB35',label:'EB35'},
        {value:'EB75',label:'EB75'},
        {value:'EN19',label:'EN19'},
        {value:'EN38',label:'EN38'},
      ],
      //发生环节的选择列表
      linkOptions:departmentOptions,
      //发现工序的选择列表
      positionOptions:opList,

      //富文本编辑器的相关变量
      editor: null, // 用于存储 wangEditor 实例
      editor1: null, // 用于存储 wangEditor 实例
      editor2: null, // 用于存储 wangEditor 实例
    }
  },
  watch: {},
  methods: {
    //退出登录
    logOut(){
      localStorage.removeItem('u_token');
      localStorage.removeItem('userName')
      this.$router.push('UserLogin')
    },
    //通用，语言选择
    chooseLanguage(language){
      this.languageS=language
      if (language==='chinese'){
        this.main.qualityManagementSystem='俄动力质量管理系统'
        this.main.suspiciousProduct='可疑品业务'
        this.main.assemblyWorkshop='装配车间可疑品'
        this.main.machiningWorkshop='机加车间可疑品'
        this.main.logistics='物流科可疑品'
        this.main.suspiciousProductHandling='可疑品处理'
        this.main.listOfSuspiciousProducts='可疑品清单'
        this.main.reworkAndRepairList='返工返修清单'
        this.main.modelSpecification='模型说明'
        this.main.listOfSuspectedItems='可疑品清单台账目录'
        this.main.partName='零部件名称'
        this.main.occurDate='发生日期'
      }
      else if (language==='english'){
        this.main.qualityManagementSystem='Quality Management System'
        this.main.suspiciousProduct='Suspicious Product'
        this.main.assemblyWorkshop='Assembly Workshop'
        this.main.machiningWorkshop='Machining Workshop'
        this.main.logistics='Logistics'
        this.main.suspiciousProductHandling='Suspicious Product Handling'
        this.main.listOfSuspiciousProducts='List of Suspicious Products'
        this.main.reworkAndRepairList='Rework and Repair List'
        this.main.modelSpecification='Model Specification'
        this.main.listOfSuspectedItems='List Of Suspected Items'
        this.main.partName='Part Name'
        this.main.occurDate='Occur Date'
      }
      else if (language==='russian'){
        this.main.qualityManagementSystem='Cистема yправления качества'
        this.main.suspiciousProduct='Подозрительный продукт'
        this.main.assemblyWorkshop='Цех сборки двигателей'
        this.main.machiningWorkshop='Цех механической обработки'
        this.main.logistics='Отдел логистики'
        this.main.suspiciousProductHandling='Обработка подозрительной продукции'
        this.main.listOfSuspiciousProducts='Список подозрительных продуктов'
        this.main.reworkAndRepairList='Переработка и ремонт Список'
        this.main.modelSpecification='Спецификация модели'
        this.main.listOfSuspectedItems='Список подозреваемых предметов'
        this.main.partName='Название части'
        this.main.occurDate='Дата происхождения'
      }
    },
    //查询用户信息的函数
    inquiry(){
      //输入用户编号，向后端查询信息
      const useId=localStorage.getItem('userName').replace(/"/g, '');
      this.$request.post('/useQueryPower',{
        queryFiledName:'changeModel',
        userId:useId,
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }else {
          this.useName=result.data.name
          this.usePower=result.data.changeModel
          this.useId=useId
          console.log(this.useId,this.usePower,this.useName)
        }
      })
    },
    // 通用，弹窗关闭的时候
    //无意关闭弹窗的函数
    handleClose(done) {
      this.$confirm('确认关闭？')
          // eslint-disable-next-line no-unused-vars
          .then(_ => {
            done();
          })
          // eslint-disable-next-line no-unused-vars
          .catch(_ => {});
    },
    //在tab控件上单击的函数
    handleClick(tab, event) {
      console.log(tab, event);
      if (this.activeName==='second'){
        this.reworkListDataNew()
      }
    },
    //初始化富文本编辑器
    // 初始化 wangEditor
    initEditor() {
      // 检查是否已经存在编辑器实例
      if (this.editor) {
        return; // 如果已经存在，则直接返回，不重复初始化
      }
      // 创建编辑器实例，并传入配置
      this.editor = new E(this.$refs.editorContainer);
      this.editor.config.height=100
      this.editor.config.colors = [
        '#FF0000', // 红色
        '#00FF00', // 绿色
        '#0000FF', // 蓝色
        '#FFFF00', // 黄色
        '#00FFFF', // 青色
        '#FF00FF', // 品红
        '#000000', // 黑色
        // 添加更多的颜色...
      ];
      // 配置编辑器
      this.editor.config.menus =[
        'head',
        'bold',
        'italic',
        'underline',
        'strikeThrough',
         'foreColor',
        'backColor',
        'list',
        'justify',
        'table',
        // 其他你需要的菜单...
        ]
        // 其他配置...

      // 创建编辑器（在某些版本中，这一步可能是自动的，不需要显式调用）
      this.editor.create();
    },
    initEditor1() {
      // 检查是否已经存在编辑器实例
      if (this.editor1) {
        return; // 如果已经存在，则直接返回，不重复初始化
      }
      // 创建编辑器实例，并传入配置
      this.editor1 = new E(this.$refs.editorContainer1);
      this.editor1.config.height=100
      this.editor1.config.colors = [
        '#FF0000', // 红色
        '#00FF00', // 绿色
        '#0000FF', // 蓝色
        '#FFFF00', // 黄色
        '#00FFFF', // 青色
        '#FF00FF', // 品红
        '#000000', // 黑色
        // 添加更多的颜色...
      ];
      // 配置编辑器
      this.editor1.config.menus =[
        'head',
        'bold',
        'italic',
        'underline',
        'strikeThrough',
        'foreColor',
        'backColor',
        'list',
        'justify',
        'table',
        // 其他你需要的菜单...
      ]


      // 创建编辑器（在某些版本中，这一步可能是自动的，不需要显式调用）
      this.editor1.create();
    },
    initEditor2() {
      // 检查是否已经存在编辑器实例
      if (this.editor2) {
        return; // 如果已经存在，则直接返回，不重复初始化
      }
      // 创建编辑器实例，并传入配置
      this.editor2 = new E(this.$refs.editorContainer2);
      this.editor2.config.height=100
      this.editor2.config.colors = [
        '#FF0000', // 红色
        '#00FF00', // 绿色
        '#0000FF', // 蓝色
        '#FFFF00', // 黄色
        '#00FFFF', // 青色
        '#FF00FF', // 品红
        '#000000', // 黑色
        // 添加更多的颜色...
      ];
      // 配置编辑器
      this.editor2.config.menus =[
        'head',
        'bold',
        'italic',
        'underline',
        'strikeThrough',
        'foreColor',
        'backColor',
        'list',
        'justify',
        'table',
        // 其他你需要的菜单...
      ]
      // 其他配置...

      // 创建编辑器（在某些版本中，这一步可能是自动的，不需要显式调用）
      this.editor2.create();
    },
    //单击业务流程展开的变量
    productChange(val) {
      console.log(val);
    },
    //增加/编辑一条不良品信息，1.增加；2.编辑；3.删除
    suspectEdit(doe,scope){
      //把点击的行传递出去
      this.suspectDoe=doe
      this.suspectScope=scope
      //是新增一条可疑品信息
      if (doe===1){
        //数据初始化：
        this.suspectListForm={
          //主键
          id:0,
          //零部件名称
          partName:'',
          //零部件供方
          partSupplier:'',
          //型号
          modelId:'',
          //发生时间
          occurDate:'',
          //发送环节
          link:'',
          //发现环节
          position:'',
          //发现人
          occurPer:'',
          //工件号
          partId:'',
          //问题描述
          describeUse:'',
          //发生数量
          partNum:'',
          //可疑品判断
          judgment:'',
          //追溯判定
          fromJudgment:'',
          //追溯过程
          fromProcess:'',
          //不良品处理
          unqualified:'',
          //返工返修
          rework:'',
          //问题解决
          solve:'',
          //删除标记位
          deleteSign:'',
          //创建时间
          establishTime:'',
          //修改时间
          updateTime:'',
          //编辑人姓名
          editName:'',
        }
        //表头赋值
        this.titleUse='您正在增加一条可疑品信息'
        //打开弹窗
        this.suspectDialog=true
      }
      //是编辑一条可疑品信息
      else if (doe===2){
        //数据初始化
        this.suspectListForm=_.cloneDeep(scope.row)
        //表头赋值
        this.titleUse='您正在修改一条可疑品信息'
        //打开弹窗
        this.suspectDialog=true
      }
      //是删除一条可疑品信息
      else if (doe===3){
        //数据初始化
        this.suspectListForm=_.cloneDeep(scope.row)
        //表头赋值
        this.titleUse='您正在删除一条可疑品信息'
        //打开弹窗
        this.suspectDialog=true
      }
    },
    //单击编辑不良品信息中的弹窗中的确定
    suspectEditClick(){
      //进行数据校核，不允许出现空，数量不允许是0
      if (this.suspectListForm.partName===''){
        alert("请选择零部件名称")
      }
      else if (this.suspectListForm.partSupplier===''){
        alert("请输入零部件供方")
      }
      else if (this.suspectListForm.modelId===''){
        alert("请选择机型")
      }
      else if (this.suspectListForm.occurDate===''){
        alert("请选择发生时间")
      }
      else if (this.suspectListForm.link===''){
        alert("请选择发生环节")
      }
      else if (this.suspectListForm.position===''){
        alert("请选择发现工序")
      }
      else if (this.suspectListForm.occurPer===''){
        alert("请输入发现人")
      }
      else if (this.suspectListForm.partId===''){
        alert("请输入工件号")
      }
      else if (!Number.isInteger(this.suspectListForm.partNum) || this.suspectListForm.partNum <= 0){
        alert("请正确输入数量")
      }
      else if (this.suspectListForm.describeUse===''){
        alert("请输入问题描述")
      }
      else {
        //是增加一条不良品信息
        if (this.suspectDoe===1){
          //组合数据
          this.suspectListForm.editName=this.useName
          //组合不良品判定信息

          //向后端发送数据，进行插入
          this.$request.post('suspectProductInsertOne',this.suspectListForm).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }else {
                alert("保存成功")
              this.suspectList.push(result.data)
              this.suspectDialog=false
            }
          })
        }
        //是修改一条不良品信息
        else if (this.suspectDoe===2){
          //组合数据
          this.suspectListForm.editName=this.useName
          //向后端发送数据，进行插入
          this.$request.post('suspectProductEditOne',this.suspectListForm).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }else {
              alert('修改成功')
              this.suspectDialog=false
              //组合数据
              this.suspectList[this.suspectScope.$index]=_.cloneDeep(this.suspectListForm)
              this.suspectListShow[0]=_.cloneDeep(this.suspectListForm)
            }
          })
        }
        //是删除一条不良品信息
        else if (this.suspectDoe===3){
          //数据初始化
          this.suspectListForm=_.cloneDeep(this.suspectScope.row)
          this.suspectListForm.deleteSign=0
          //向后端发送数据，进行插入
          this.$request.post('suspectProductEditOne',this.suspectListForm).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }else {
              alert('删除成功')
              this.suspectDialog=false
              //组合数据
              this.suspectListShow=[]
              this.suspectList.splice(this.suspectScope.$index,1)

            }
          })
        }
      }
    },
    //单击《不良品清单》上的反应
    suspectListClick(scope){
      this.suspectScope=scope
      this.suspectListShow=[]
      this.suspectListShow.push(scope.row)
      //组合数据：可疑品判断
      if (this.suspectListShow[0].judgment===undefined){
        //是内容，没有人处理过
        this.judgmentList={}
      }
      else {
        const temp=this.suspectListShow[0].judgment.split('|%|')
        this.judgmentList= {
          //判断结果
          judgment:toInteger(temp[0]),//0暂未判定；1.让步使用；2.返工返修；3.工废；4.料废
              //判定人
          judgmentPer:temp[1],
            //判定时间
            judgmentDate:temp[2],
            //预留
            judgment1:temp[3],
            //预留
            judgment2:temp[4],
            //预留
            judgment3:temp[5],
            //标识人
            judgmentMark:temp[6],
            //标识时间
            MarkDate:temp[7],
            //预留
            Mark1:temp[8],
            //预留
            Mark2:temp[9],
            //预留
            Mark3:temp[10],
            //检验复核
            testPer:temp[11],
            //检验复核时间
            testDate:temp[12],
            //预留
            test1:temp[13],
            // 预留
            test2:temp[14],
            // 预留
            test3:temp[15],
        }
      }
      //组合数据：追溯判定
      if (this.suspectListShow[0].fromJudgment===undefined){
        //是内容，没有人处理过
        this.fromJudgmentData={}
      }
      else {
        const temp=this.suspectListShow[0].fromJudgment.split('|%|')
        this.fromJudgmentData= {
          // 检验员追溯结果
          inspectorJud: temp[0],//0:没有追溯；1：无异常；2：有异常
          // 异常描述
          inspectorDes: temp[1],
          // 追溯人
          inspectorPer: temp[2],
          // 追溯日期
          inspectorDate: temp[3],
          // 上传信息时间
          inspectorEditDate: temp[4],
          //编辑人
          editName: temp[5],
          // 预留
          inspector1: temp[6],
          // 预留
          inspector2: temp[7],
          // 预留
          inspector3: temp[8],
          // 车间追溯结果
          workshopJud: temp[9],//0:没有追溯；1：无异常；2：有异常
          // 异常描述
          workshopDes: temp[10],
          // 追溯人
          workshopPer: temp[11],
          // 追溯日期
          workshopDate: temp[12],
          // 上传信息时间
          workshopEditDate: temp[13],
          //车间信息上传人
          workshopEditName: temp[14],
          // 预留
          workshop1: temp[15],
          // 预留
          workshop2: temp[16],
          // 预留
          workshop3: temp[17],
          //负责人判定判定信息
          technicianJud: temp[18],
          //判定日期-时间
          technicianDate: temp[19],
          //判断人
          technicianPer: temp[20],
          //编辑人
          technicianEditName: temp[21],
          //编辑时间
          technicianEditDate: temp[22],
          //预留
          technician1: temp[23],
          //预留
          technician2: temp[24],
          //预留
          technician3: temp[25],
          //追溯描述
          qualityDec: temp[26],
          //科长批准
          qualityJud: temp[27],//0代表没有出具意见；1：追溯；2：不追溯
          //批准日期
          qualityDate: temp[28],
          //批准人
          qualityPer: temp[29],
          //编辑人
          qualityEditName: temp[30],
          //编辑日期
          qualityEditDate: temp[31],
          // 预留
          quality1: temp[32],
          // 预留
          quality2: temp[33],
          // 预留
          quality3: temp[34],
        }
      }
      //组合数据：追溯过程
      if (this.suspectListShow[0].fromProcess===undefined){
        //是内容，没有人处理过
        this.fromProcessData={}
        this.fromProCheckList=[]
      }
      else {
        const temp=this.suspectListShow[0].fromProcess.split('|%|')
        this.fromProcessData= {
          //追溯方案编号
          processNum:temp[0],
          //追溯方案下发人
          processPer:temp[1],
          //下发时间
          processDate:temp[2],
          //需要开展追溯的部门
          suspectList:temp[3],
          //编辑时间
          processEditDate:temp[4],
          //上传人
          processEditName:temp[5],
          //预留
          process1:temp[6],
          //预留
          process2:temp[7],
          //预留
          process3:temp[8],
          //需要输出过程追溯记录表的部门：装配车间
          assWork:temp[9],//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          assWorkList:temp[10],
          //责任人
          assWorkPer:temp[11],
          //完成时间
          assWorkDate:temp[12],
          //编辑人
          assWorkEditName:temp[13],
          //编辑时间
          assWorkEditDate:temp[14],
          //预留
          assWork1:temp[15],
          //预留
          assWork2:temp[16],
          //预留
          assWork3:temp[17],
          //需要输出过程追溯记录表的部门：机加车间
          macWork:temp[18],//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          macWorkList:temp[19],
          //责任人
          macWorkPer:temp[20],
          //完成时间
          macWorkDate:temp[21],
          //编辑人
          macWorkEditName:temp[22],
          //编辑时间
          macWorkEditDate:temp[23],
          //预留
          macWork1:temp[24],
          //预留
          macWork2:temp[25],
          //预留
          macWork3:temp[26],
          //需要输出过程追溯记录表的部门：物流科
          logDep:temp[27],//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          logDepList:temp[28],
          //责任人
          logDepPer:temp[29],
          //完成时间
          logDepDate:temp[30],
          //编辑人
          logDepEditName:temp[31],
          //编辑时间
          logDepEditDate:temp[32],
          //预留
          logDep1:temp[33],
          //预留
          logDep2:temp[34],
          //预留
          logDep3:temp[35],
          //需要输出过程追溯记录表的部门：品技科
          tecDep:temp[36],//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          tecDepList:temp[37],
          //责任人
          tecDepPer:temp[38],
          //完成时间
          tecDepDate:temp[39],
          //编辑人
          tecDepEditName:temp[40],
          //编辑时间
          tecDepEditDate:temp[41],
          //预留
          tecDep1:temp[42],
          //预留
          tecDep2:temp[43],
          //预留
          tecDep3:temp[44],
          //产品遏制表编号（品技）
          containNum:temp[45],
          //责任人
          containPer:temp[46],
          //完成时间
          containDate:temp[47],
          //编辑人
          containEditName:temp[48],
          //编辑时间
          containEditDate:temp[49],
          //预留
          contain1:temp[50],
          //预留
          contain2:temp[51],
          //预留
          contain3:temp[52],
          //品管出具
          //追溯报告编号
          reportNum:temp[53],
          //责任人
          reportPer:temp[54],
          //完成时间
          reportDate:temp[55],
          //编辑人
          reportEditName:temp[56],
          //编辑时间
          reportEditDate:temp[57],
          //预留
          report1:temp[58],
          //预留
          report2:temp[59],
          //预留
          report3:temp[60],
        }
        if (this.fromProcessData.suspectList==='' || this.fromProcessData.suspectList===undefined || this.fromProcessData==='undefined'){
          this.fromProCheckList=[]
        }
        else {
          this.fromProCheckList=this.fromProcessData.suspectList.split('|-|')
        }
      }
      //组合数据：不良评审
      if (this.suspectListShow[0].fromProcess===undefined){
        //是内容，没有人处理过
        this.unqualifiedData={}
      }
      else {
        const temp=this.suspectListShow[0].unqualified.split('|%|')
        this.unqualifiedData= {
          //不良品评审编号
          unqualifiedList:temp[0],
          //不良品评审意见
          unqualified:temp[1],//1:让步接收；2.挑选；3：返工返修；
          //负责人
          unqualifiedPer:temp[2],
          //完成时间
          unqualifiedDate:temp[3],
          //编辑人
          unqualifiedEditName:temp[4],
          //编辑时间
          unqualifiedEditDate:temp[5],
          //预留
          unqualified1:temp[6],
          //预留
          unqualified2:temp[7],
          //预留
          unqualified3:temp[8],
        }
        this.unqualifiedData.unqualified=toInteger(this.unqualifiedData.unqualified)
        console.log(this.unqualifiedData.unqualified)
      }
      //组合数据：不良处理
      if (this.suspectListShow[0].rework===undefined){
        //是内容，没有人处理过
        this.reworkData={}
      }
      else {
        const temp=this.suspectListShow[0].rework.split('|%|')
        this.reworkData= {
          // 让步接收相关
          compromiseEndDate: temp[0],         // 0
          compromiseEngineNum: temp[1],       // 1
          compromiseText: temp[2],            // 2
          compromisePer: temp[3],             // 3
          compromiseEditName: temp[4],        // 4
          compromiseDate: temp[5],            // 5
          compromise1: temp[6],               // 6
          compromise2: temp[7],               // 7
          compromise3: temp[8],               // 8

          // 记录挑选相关的内容
          processNum: temp[9],                // 9
          processStandard: temp[10],          // 10
          processTecPer: temp[11],            // 11
          processTecDate: temp[12],           // 12
          processEditName: temp[13],          // 13
          processEditDate: temp[14],          // 14
          processTec1: temp[15],              // 15
          processTec2: temp[16],              // 16
          processTec3: temp[17],              // 17
          processResult: temp[18],            // 18
          processWorkPre: temp[19],           // 19
          processWorkDate: temp[20],          // 20
          processWorkEditName: temp[21],      // 21
          processWorkEditDate: temp[22],      // 22
          processWork1: temp[23],             // 23
          processWork2: temp[24],             // 24
          processWork3: temp[25],             // 25

          // 不合格品标记/开票，检验处理信息
          ticketText: temp[26],               // 26
          ticketPer: temp[27],                // 27
          ticketDate: temp[28],               // 28
          ticketNmu: temp[29],                // 29
          ticketEditName: temp[30],           // 30
          ticketEditDate: temp[31],           // 31
          ticket1: temp[32],                  // 32
          ticket2: temp[33],                  // 33
          ticket3: temp[34],                  // 34

          // 挑选产品装机记录
          processEngineNum: temp[35],         // 35
          processNumDate: temp[36],           // 36
          processText: temp[37],              // 37
          processPer: temp[38],               // 38
          processNumEditName: temp[39],       // 39
          processNumEditDate: temp[40],       // 40
          process1: temp[41],                  // 41
          process2: temp[42],                  // 42
          process3: temp[43],                  // 43

          // 返工返修要领书相关的变量
          workBookNum: temp[44],              // 44
          workBookList: temp[45],             // 45
          workPer: temp[46],                  // 46
          workDate: temp[47],                 // 47
          workEditName: temp[48],             // 48
          workEditDate: temp[49],             // 49
          work1: temp[50],                    // 50
          work2: temp[51],                    // 51
          work3: temp[52],                    // 52

          // 返修过程相关
          returnedStartDate: temp[53],        // 53
          returnedNum: temp[54],              // 54
          returnedDate: temp[55],             // 55
          returnedPer: temp[56],              // 56
          returnedResult: temp[57],           // 57
          returnedEnd: temp[58],              // 58
          returnedTime: temp[59],             // 59
          returnedEditName: temp[60],         // 60
          returned1: temp[61],                // 61
          returned2: temp[62],                // 62
          returned3: temp[63],                // 63

          // 检验确认相关
          testResult: temp[64],               // 64
          testVerdict: temp[65],              // 65
          testPre: temp[66],                  // 66
          testDate: temp[67],                 // 67
          testEditName: temp[68],             // 68
          testEditDate: temp[69],             // 69
          test1: temp[70],                    // 70
          test2: temp[71],                    // 71
          test3: temp[72],                    // 72

          // 品技确认相关
          tecPer: temp[73],                   // 73
          tecDate: temp[74],                  // 74
          tecResult: temp[75],                // 75
          tecEditName: temp[76],              // 76
          tecEditDate: temp[77],              // 77
          tec1: temp[78],                     // 78
          tec2: temp[79],                     // 79
          tec3: temp[80],                     // 80

          // 再次装机相关
          endDate: temp[81],                  // 81
          endEngineId: temp[82],              // 82
          endPer: temp[83],                   // 83
          endText: temp[84],                  // 84
          endEditDate: temp[85],              // 85
          endEditPer: temp[86],               // 86
          end1: temp[87],                     // 87
          end2: temp[88],                     // 88
          end3: temp[89]                      // 89
        }

      }
      //组合数据：问题解决
      if (this.suspectListShow[0].solve===undefined){
        //是内容，没有人处理过
        this.solveData={}
      }
      else {
        const temp=this.suspectListShow[0].solve.split('|%|')
        this.solveData = {
          // 问题名称
          issueNames: temp[0],
          // 原因分析
          causeAnalysis: temp[1],
          // 整改对策
          measure: temp[2],
          // 整改对策完成时间
          meaDate: temp[3],
          // 整改对策实施切换发动机号/零部件号
          meaEngineId: temp[4],
          // 横展内容
          extend: temp[5],
          // 横展完成时间
          extDate: temp[6],
          // 横展实施切换发动机号
          extEngineId: temp[7],
          // 编辑人
          issEditName: temp[8],
          // 编辑时间
          issEditDate: temp[9],
          // 预留
          iss1: temp[10],
          // 预留
          iss2: temp[11],
          // 预留
          iss3: temp[12],
          // 结题状态
          endIs: temp[13],
          // 结题完成时间
          endDate: temp[14],
          // 结题判定人
          endPer: temp[15],
          // 结题编辑人
          endEditName: temp[16],
          // 编辑时间
          endEditDate: temp[17],
          // 预留
          end1: temp[18],
          // 预留
          end2: temp[19],
          // 预留
          end3: temp[20],
        };
      }
    },
    //可疑品判定中用到的判定，准备弹窗
    judgment(doe){
      this.judgmentDoe=doe
      //检验员对判定结果进行判断，可能是修改，也可能是新判定。
      if (doe===1){
        //数据赋值
        if (Object.keys(this.judgmentList).length === 0){
          //没有处理过，需要一个新的
          this.judgmentListForm={
            //判断结果
            judgment:0,//0暂未判定；1.让步使用；2.返工返修；3.工废；4.料废
            //判定人
            judgmentPer:'',
            //判定时间
            judgmentDate:'',
            //预留
            judgment1:'',
            //预留
            judgment2:'',
            //预留
            judgment3:'',

            //标识人
            judgmentMark:'',
            //标识时间
            MarkDate:'',
            //预留
            Mark1:'',
            //预留
            Mark2:'',
            //预留
            Mark3:'',
            //检验复核（开票）
            testPer:'',
            //检验复核时间
            testDate:'',
            //预留
            test1:'',
            // 预留
            test2:'',
            // 预留
            test3:'',
          }
        }
        else {
          this.judgmentListForm=_.cloneDeep(this.judgmentList)
          //如果日期为，填充为今天日期
          if (this.judgmentListForm.judgmentDate==='' || this.judgmentListForm.judgmentDate===undefined || this.judgmentListForm.judgmentDate==='undefined'){
            const date = new Date();
            // 获取年份（yyyy）
            const year = date.getFullYear();

            // 获取日期（dd），并填充前导零
            const day = String(date.getDate()).padStart(2, '0');

            // 获取月份（MM），并填充前导零
            const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以需要+1

            // 格式化日期为 yyyy-dd-MM
            this.judgmentListForm.judgmentDate = `${year}-${month}-${day}`;
          }

        }
        this.titleUse='您正在判定不良品'
        // 打开弹窗
        this.judgmentDialog1=true
      }
      else if (doe===2){
        //数据赋值
        if (Object.keys(this.judgmentList).length === 0){
          //没有处理过，需要一个新的
          this.judgmentListForm={
            //判断结果
            judgment:0,//0暂未判定；1.让步使用；2.返工返修；3.工废；4.料废
            //判定人
            judgmentPer:'',
            //判定时间
            judgmentDate:'',
            //预留
            judgment1:'',
            //预留
            judgment2:'',
            //预留
            judgment3:'',

            //标识人
            judgmentMark:'',
            //标识时间
            MarkDate:'',
            //预留
            Mark1:'',
            //预留
            Mark2:'',
            //预留
            Mark3:'',
            //检验复核（开票）
            testPer:'',
            //检验复核时间
            testDate:'',
            //预留
            test1:'',
            // 预留
            test2:'',
            // 预留
            test3:'',
          }
        }
        else {
          this.judgmentListForm=_.cloneDeep(this.judgmentList)
          //如果日期为，填充为今天日期
          if (this.judgmentListForm.MarkDate==='' || this.judgmentListForm.MarkDate===undefined || this.judgmentListForm.MarkDate==='undefined'){
            const date = new Date();
            // 获取年份（yyyy）
            const year = date.getFullYear();

            // 获取日期（dd），并填充前导零
            const day = String(date.getDate()).padStart(2, '0');

            // 获取月份（MM），并填充前导零
            const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以需要+1

            // 格式化日期为 yyyy-dd-MM
            this.judgmentListForm.MarkDate = `${year}-${month}-${day}`;
          }
        }
        this.titleUse='您正在标记不良品'
        // 打开弹窗
        this.judgmentDialog2=true
      }
      else if (doe===3){
        //数据赋值
        if (Object.keys(this.judgmentList).length === 0){
          //没有处理过，需要一个新的
          this.judgmentListForm={
            //判断结果
            judgment:0,//0暂未判定；1.让步使用；2.返工返修；3.工废；4.料废
            //判定人
            judgmentPer:'',
            //判定时间
            judgmentDate:'',
            //预留
            judgment1:'',
            //预留
            judgment2:'',
            //预留
            judgment3:'',

            //标识人
            judgmentMark:'',
            //标识时间
            MarkDate:'',
            //预留
            Mark1:'',
            //预留
            Mark2:'',
            //预留
            Mark3:'',
            //检验复核（开票）
            testPer:'',
            //检验复核时间
            testDate:'',
            //预留
            test1:'',
            // 预留
            test2:'',
            // 预留
            test3:'',
          }
        }
        else {
          this.judgmentListForm=_.cloneDeep(this.judgmentList)
          //如果日期为空，填充为今天日期
          if (this.judgmentListForm.testDate==='' || this.judgmentListForm.testDate===undefined || this.judgmentListForm.testDate==='undefined'){
            const date = new Date();
            // 获取年份（yyyy）
            const year = date.getFullYear();

            // 获取日期（dd），并填充前导零
            const day = String(date.getDate()).padStart(2, '0');

            // 获取月份（MM），并填充前导零
            const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以需要+1

            // 格式化日期为 yyyy-dd-MM
            this.judgmentListForm.testDate = `${year}-${month}-${day}`;
          }
        }
        this.titleUse='您正在标记开票信息'
        // 打开弹窗
        this.judgmentDialog3=true
      }

    },
    //判断可疑品上的单击弹窗确定
    judgmentClick(doe){
      //是检验员判定
      if (doe===1){
        //数据校验
        if (this.judgmentListForm.judgment==='' || this.judgmentListForm.judgment==='undefined'){
          alert('请选择判定结果')
          return
        }
        else if (this.judgmentListForm.judgmentPer==='' || this.judgmentListForm.judgmentPer==='undefined'){
          alert('请输入判定人')
          return;
        }
        else if (this.judgmentListForm.judgmentDate==='' || this.judgmentListForm.judgmentDate==='undefined'){
          alert('请选择判定日期')
          return;
        }
        //数据初始化
        this.judgmentListForm.judgment1=this.useName
        this.judgmentDialog1=false
      }
      else if (doe===2){
        //数据校验
        if (this.judgmentListForm.judgmentMark==='' || this.judgmentListForm.judgmentMark==='undefined'){
          alert('请输入处理人')
          return;
        }
        else if (this.judgmentListForm.MarkDate==='' || this.judgmentListForm.MarkDate==='undefined'){
          alert('请选择日期')
          return;
        }
        //数据初始化
        this.judgmentListForm.Mark1=this.useName
        this.judgmentDialog2=false
      }
      else if (doe===3){
        //数据校验
        if (this.judgmentListForm.testPer==='' || this.judgmentListForm.testDate==='undefined'){
          alert('请输入开票人')
          return;
        }
        else if (this.judgmentListForm.testDate==='' || this.judgmentListForm.testDate==='undefined'){
          alert('请输入开票日期')
          return;
        }
        //数据初始化
        this.judgmentListForm.test1=this.useName
        this.judgmentDialog3=false
      }
      //组合数据,直接组合成为字符串，中间用|%|隔开
      const resultString =
          this.judgmentListForm.judgment+"|%|"+
          this.judgmentListForm.judgmentPer+"|%|"+
          this.judgmentListForm.judgmentDate+"|%|"+
          this.judgmentListForm.judgment1+"|%|"+
          this.judgmentListForm.judgment2+"|%|"+
          this.judgmentListForm.judgment3+"|%|"+
          this.judgmentListForm.judgmentMark+"|%|"+
          this.judgmentListForm.MarkDate+"|%|"+
          this.judgmentListForm.Mark1+"|%|"+
          this.judgmentListForm.Mark2+"|%|"+
          this.judgmentListForm.Mark3+"|%|"+
          this.judgmentListForm.testPer+"|%|"+
          this.judgmentListForm.testDate+"|%|"+
          this.judgmentListForm.test1+"|%|"+
          this.judgmentListForm.test2+"|%|"+
          this.judgmentListForm.test3
      this.editOneFiledById(this.suspectScope.row.id,'judgment',resultString)
      //组合数据
      this.judgmentList=_.cloneDeep(this.judgmentListForm)
      this.suspectScope.row.judgment=resultString
      this.suspectList[this.suspectScope.$index].judgment=resultString
    },
    //追溯判定上的控制弹窗函数
    fromJud(doe){
      this.fromJubDoe=doe
      //数据赋值
      if (Object.keys(this.fromJudgmentData).length === 0){
        //没有处理过，需要一个新的
        this.fromJudgmentFrom={
          // 检验员追溯结果
          inspectorJud:'0',//0:没有追溯；1：无异常；2：有异常
          // 异常描述
          inspectorDes:'',
          // 追溯人
          inspectorPer:'',
          // 追溯日期
          inspectorDate:'',
          // 上传信息时间
          inspectorEditDate:'',
          //编辑人
          editName:'',
          // 预留
          inspector1:'',
          // 预留
          inspector2:'',
          // 预留
          inspector3:'',
          // 车间追溯结果
          workshopJud:0,//0:没有追溯；1：无异常；2：有异常
          // 异常描述
          workshopDes:'',
          // 追溯人
          workshopPer:'',
          // 追溯日期
          workshopDate:'',
          // 上传信息时间
          workshopEditDate:'',
          //车间信息上传人
          workshopEditName:'',
          // 预留
          workshop1:'',
          // 预留
          workshop2:'',
          // 预留
          workshop3:'',
          //负责人判定判定信息
          technicianJud:'',
          //判定日期-时间
          technicianDate:'',
          //判断人
          technicianPer:'',
          //编辑人
          technicianEditName:'',
          //编辑时间
          technicianEditDate:'',
          //预留
          technician1:'',
          //预留
          technician2:'',
          //预留
          technician3:'',
          //追溯描述
          qualityDec:'',
          //科长批准
          qualityJud:1,//0代表没有出具意见；1：追溯；2：不追溯
          //批准日期
          qualityDate:'',
          //批准人
          qualityPer:'',
          //编辑人
          qualityEditName:'',
          //编辑日期
          qualityEditDate:'',
          // 预留
          quality1:'',
          // 预留
          quality2:'',
          // 预留
          quality3:'',
        }
      }
      else {
        this.fromJudgmentFrom=_.cloneDeep(this.fromJudgmentData)
      }

      if (doe===1){
        //如果日期为空，填充为今天日期
        if (this.fromJudgmentFrom.inspectorDate==='' || this.fromJudgmentFrom.inspectorDate===undefined || this.fromJudgmentFrom.inspectorDate==='undefined'){
          const date = new Date();
          // 获取年份（yyyy）
          const year = date.getFullYear();

          // 获取日期（dd），并填充前导零
          const day = String(date.getDate()).padStart(2, '0');

          // 获取月份（MM），并填充前导零
          const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以需要+1

          // 格式化日期为 yyyy-dd-MM
          this.fromJudgmentFrom.inspectorDate = `${year}-${month}-${day}`;
        }
        this.titleUse='（检验）您正在更新追溯信息'
        this.fromJudDialog1=true
      }
      else if (doe===2){
        //如果日期为空，填充为今天日期
        if (this.fromJudgmentFrom.workshopDate==='' || this.fromJudgmentFrom.workshopDate===undefined || this.fromJudgmentFrom.workshopDate==='undefined'){
          const date = new Date();
          // 获取年份（yyyy）
          const year = date.getFullYear();

          // 获取日期（dd），并填充前导零
          const day = String(date.getDate()).padStart(2, '0');

          // 获取月份（MM），并填充前导零
          const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以需要+1

          // 格式化日期为 yyyy-dd-MM
          this.fromJudgmentFrom.workshopDate = `${year}-${month}-${day}`;
        }
        this.titleUse='(车间/其他部门）您正在更新追溯信息'
        this.fromJudDialog2=true
      }
      else if (doe===3){
        //如果日期为空，填充为今天日期
        if (this.fromJudgmentFrom.technicianDate==='' || this.fromJudgmentFrom.technicianDate===undefined || this.fromJudgmentFrom.technicianDate==='undefined'){
          this.fromJudgmentFrom.technicianDate=this.nowDate()
        }
        this.titleUse='(品技科）您正在编辑是否需要追溯'
        this.fromJudDialog3=true
      }
      else if (doe===4){
        //如果日期为空，填充为今天日期
        if (this.fromJudgmentFrom.qualityDate==='' || this.fromJudgmentFrom.qualityDate===undefined || this.fromJudgmentFrom.qualityDate==='undefined'){
          this.fromJudgmentFrom.qualityDate=this.nowDate()
        }
        this.titleUse='(品技科）您正在批准是否需要追溯'
        this.fromJudDialog4=true
      }
    },
    //追溯判定上弹窗控制中的确定按钮
    fromJudClick(doe){
      if (doe===1){
        //数据校验
        if (this.fromJudgmentFrom.inspectorJud===''){
          alert('请选择结果')
          return
        }
        else if (this.fromJudgmentFrom.inspectorPer===''){
          alert('请输入追溯人')
          return
        }
        else if (this.fromJudgmentFrom.inspectorDate===''){
          alert('请选择完成日期')
          return
        }
        else if (this.fromJudgmentFrom.inspectorDes===''){
          alert('请输入追溯描述')
          return
        }
        //初始化数据
        this.fromJudgmentFrom.editName=this.useName
        //关闭窗口
        this.fromJudDialog1=false
      }
      else if (doe===2){
        //数据校验
        if (this.fromJudgmentFrom.workshopJud==='' || this.fromJudgmentFrom.workshopJud==='undefined'){
          alert('请选择结果')
          return
        }
        else if (this.fromJudgmentFrom.workshopPer==='' || this.fromJudgmentFrom.workshopPer==='undefined'){
          alert('请输入追溯人')
          return
        }
        else if (this.fromJudgmentFrom.workshopDate==='' || this.fromJudgmentFrom.workshopDate==='undefined'){
          alert('请选择完成日期')
          return
        }
        else if (this.fromJudgmentFrom.workshopDes==='' || this.fromJudgmentFrom.workshopDes==='undefined'){
          alert('请输入追溯描述')
          return
        }
        //初始化数据
        this.fromJudgmentFrom.workshopEditName=this.useName
        //关闭窗口
        this.fromJudDialog2=false
      }
      //技术员选择是否需要追溯
      else if (doe===3){
        //数据校验
        if (this.fromJudgmentFrom.technicianJud==='' || this.fromJudgmentFrom.technicianJud==='undefined'){
          alert('请选追溯类型')
          return
        }
        else if (this.fromJudgmentFrom.technicianPer==='' || this.fromJudgmentFrom.technicianPer==='undefined'){
          alert('请输入判定人')
          return
        }
        else if (this.fromJudgmentFrom.technicianDate==='' || this.fromJudgmentFrom.technicianDate==='undefined'){
          alert('请选择完成日期')
          return
        }
        else if (this.fromJudgmentFrom.qualityDec==='' || this.fromJudgmentFrom.qualityDec==='undefined'){
          alert('请输入判定理由')
          return
        }
        //初始化数据
        this.fromJudgmentFrom.technicianEditName=this.useName
        this.fromJudgmentFrom.technicianEditDate=this.nowDate()
        //关闭窗口
        this.fromJudDialog3=false
      }
      else if (doe===4){
        //数据校验
        if (this.fromJudgmentFrom.qualityPer==='' || this.fromJudgmentFrom.qualityPer==='undefined'){
          alert('请输入批准人')
          return
        }
        else if (this.fromJudgmentFrom.qualityDate==='' || this.fromJudgmentFrom.qualityDate==='undefined'){
          alert('请选择完成日期')
          return
        }
        //初始化数据
        this.fromJudgmentFrom.technicianEditName=this.useName
        this.fromJudgmentFrom.technicianEditDate=this.nowDate()
        //关闭窗口
        this.fromJudDialog4=false
      }
      //组合数据
      const str=
        // 检验员追溯结果
          this.fromJudgmentFrom.inspectorJud+'|%|'+//0:没有追溯；1：无异常；2：有异常
            // 异常描述
          this.fromJudgmentFrom.inspectorDes+'|%|'+
          // 追溯人
          this.fromJudgmentFrom.inspectorPer+'|%|'+
          // 追溯日期
          this.fromJudgmentFrom.inspectorDate+'|%|'+
          // 上传信息时间
          this.fromJudgmentFrom.inspectorEditDate+'|%|'+
          //编辑人
          this.fromJudgmentFrom.editName+'|%|'+
          // 预留
          this.fromJudgmentFrom.inspector1+'|%|'+
          // 预留
          this.fromJudgmentFrom.inspector2+'|%|'+
          // 预留
          this.fromJudgmentFrom.inspector3+'|%|'+
          // 车间追溯结果
          this.fromJudgmentFrom.workshopJud+'|%|'+//0:没有追溯；1：无异常；2：有异常
          // 异常描述
          this.fromJudgmentFrom.workshopDes+'|%|'+
          // 追溯人
          this.fromJudgmentFrom.workshopPer+'|%|'+
          // 追溯日期
          this.fromJudgmentFrom.workshopDate+'|%|'+
          // 上传信息时间
          this.fromJudgmentFrom.workshopEditDate+'|%|'+
          //车间信息上传人
          this.fromJudgmentFrom.workshopEditName+'|%|'+
          // 预留
          this.fromJudgmentFrom.workshop1+'|%|'+
          // 预留
          this.fromJudgmentFrom.workshop2+'|%|'+
          // 预留
          this.fromJudgmentFrom.workshop3+'|%|'+
          //负责人判定判定信息
          this.fromJudgmentFrom.technicianJud+'|%|'+
          //判定日期-时间
          this.fromJudgmentFrom.technicianDate+'|%|'+
          //判断人
          this.fromJudgmentFrom.technicianPer+'|%|'+
          //编辑人
          this.fromJudgmentFrom.technicianEditName+'|%|'+
          //编辑时间
          this.fromJudgmentFrom.technicianEditDate+'|%|'+
          //预留
          this.fromJudgmentFrom.technician1+'|%|'+
          //预留
          this.fromJudgmentFrom.technician2+'|%|'+
          //预留
          this.fromJudgmentFrom.technician3+'|%|'+
          //追溯描述
          this.fromJudgmentFrom.qualityDec+'|%|'+
          //科长批准
          this.fromJudgmentFrom.qualityJud+'|%|'+//0代表没有出具意见；1：追溯；2：不追溯
          //批准日期
          this.fromJudgmentFrom.qualityDate+'|%|'+
          //批准人
          this.fromJudgmentFrom.qualityPer+'|%|'+
          //编辑人
          this.fromJudgmentFrom.qualityEditName+'|%|'+
          //编辑日期
          this.fromJudgmentFrom.qualityEditDate+'|%|'+
          // 预留
          this.fromJudgmentFrom.quality1+'|%|'+
          // 预留
          this.fromJudgmentFrom.quality2+'|%|'+
          // 预留
          this.fromJudgmentFrom.quality3
      //向后端写入数据
      this.editOneFiledById(this.suspectScope.row.id,'fromJudgment',str)
      //组合数据
      //组合数据
      this.fromJudgmentData=_.cloneDeep(this.fromJudgmentFrom)
      this.suspectScope.row.judgment=str
      this.suspectList[this.suspectScope.$index].fromJudgment=str

    },
    //追溯过程上的控制弹窗函数
    fromPro(doe){
      this.fromProDoe=doe
      //数据赋值
      if (Object.keys(this.fromProcessData).length === 0){
        //没有处理过，需要一个新的
        this.fromProcessFrom={
          //追溯方案编号
          processNum:'',
          //追溯方案下发人
          processPer:'',
          //下发时间
          processDate:'',
          //需要开展追溯的部门
          suspectList:'',
          //编辑时间
          processEditDate:'',
          //上传人
          processEditName:'',
          //预留
          process1:'',
          //预留
          process2:'',
          //预留
          process3:'',
          //需要输出过程追溯记录表的部门：装配车间
          assWork:'',//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          assWorkList:'',
          //责任人
          assWorkPer:'',
          //完成时间
          assWorkDate:'',
          //编辑人
          assWorkEditName:'',
          //编辑时间
          assWorkEditDate:'',
          //预留
          assWork1:'',
          //预留
          assWork2:'',
          //预留
          assWork3:'',
          //需要输出过程追溯记录表的部门：机加车间
          macWork:'',//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          macWorkList:'',
          //责任人
          macWorkPer:'',
          //完成时间
          macWorkDate:'',
          //编辑人
          macWorkEditName:'',
          //编辑时间
          macWorkEditDate:'',
          //预留
          macWork1:'',
          //预留
          macWork2:'',
          //预留
          macWork3:'',
          //需要输出过程追溯记录表的部门：物流科
          logDep:'',//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          logDepList:'',
          //责任人
          logDepPer:'',
          //完成时间
          logDepDate:'',
          //编辑人
          logDepEditName:'',
          //编辑时间
          logDepEditDate:'',
          //预留
          logDep1:'',
          //预留
          logDep2:'',
          //预留
          logDep3:'',
          //需要输出过程追溯记录表的部门：品技科
          tecDep:'',//0代表不需要；1代表需要；
          //产品过程追溯记录表编号
          tecDepList:'',
          //责任人
          tecDepPer:'',
          //完成时间
          tecDepDate:'',
          //编辑人
          tecDepEditName:'',
          //编辑时间
          tecDepEditDate:'',
          //预留
          tecDep1:'',
          //预留
          tecDep2:'',
          //预留
          tecDep3:'',
          //产品遏制表编号（品技）
          containNum:'',
          //责任人
          containPer:'',
          //完成时间
          containDate:'',
          //编辑人
          containEditName:'',
          //编辑时间
          containEditDate:'',
          //预留
          contain1:'',
          //预留
          contain2:'',
          //预留
          contain3:'',
          //品管出具
          //追溯报告编号
          reportNum:'',
          //责任人
          reportPer:'',
          //完成时间
          reportDate:'',
          //编辑人
          reportEditName:'',
          //编辑时间
          reportEditDate:'',
          //预留
          report1:'',
          //预留
          report2:'',
          //预留
          report3:'',
        }
      }
      else {
        this.fromProcessFrom=_.cloneDeep(this.fromProcessData)
      }
      if (doe===1){
        {
          //如果日期为空，填充为今天日期
          if (this.fromProcessFrom.processDate==='' || this.fromProcessFrom.processDate===undefined || this.fromProcessFrom.processDate==='undefined'){
            // 格式化日期为 yyyy-dd-MM
            this.fromProcessFrom.processDate = this.nowDate()
          }
          //给多选框列表进行赋值
          this.fromProCheckListFrom=_.cloneDeep(this.fromProCheckList)
          this.titleUse='（品技）您正在更新追溯方案'
          this.fromProDialog1=true
        }
      }
      else if (doe===2){
        {
          //如果日期为空，填充为今天日期
          if (this.fromProcessFrom.assWorkDate==='' || this.fromProcessFrom.assWorkDate===undefined || this.fromProcessFrom.assWorkDate==='undefined'){
            // 格式化日期为 yyyy-dd-MM
            this.fromProcessFrom.assWorkDate = this.nowDate()
          }
          this.titleUse='（装配车间）您正在更新追溯方案'
          this.fromProDialog2=true
        }
      }
      else if (doe===3){
        {
          //如果日期为空，填充为今天日期
          if (this.fromProcessFrom.assWorkDate==='' || this.fromProcessFrom.assWorkDate===undefined || this.fromProcessFrom.assWorkDate==='undefined'){
            // 格式化日期为 yyyy-dd-MM
            this.fromProcessFrom.assWorkDate = this.nowDate()
          }
          this.titleUse='（机加车间）您正在更新追溯方案'
          this.fromProDialog3=true
        }
      }
      else if (doe===4){
        {
          //如果日期为空，填充为今天日期
          if (this.fromProcessFrom.logDepDate==='' || this.fromProcessFrom.logDepDate===undefined || this.fromProcessFrom.logDepDate==='undefined'){
            // 格式化日期为 yyyy-dd-MM
            this.fromProcessFrom.logDepDate = this.nowDate()
          }
          this.titleUse='（物流科）您正在更新追溯方案'
          this.fromProDialog4=true
        }
      }
      else if (doe===5){
        {
          //如果日期为空，填充为今天日期
          if (this.fromProcessFrom.containDate==='' || this.fromProcessFrom.containDate===undefined || this.fromProcessFrom.containDate==='undefined'){
            // 格式化日期为 yyyy-dd-MM
            this.fromProcessFrom.containDate = this.nowDate()
          }
          this.titleUse='（品技科）您正在更新追溯遏制表'
          this.fromProDialog5=true
        }
      }
      else if (doe===6){
        {
          //如果日期为空，填充为今天日期
          if (this.fromProcessFrom.reportDate==='' || this.fromProcessFrom.reportDate===undefined || this.fromProcessFrom.reportDate==='undefined'){
            // 格式化日期为 yyyy-dd-MM
            this.fromProcessFrom.reportDate = this.nowDate()
          }
          this.titleUse='（品管科）您正在更新追溯报告'
          this.fromProDialog6=true
        }
      }
    },
    //追溯过程上的弹窗，点击确定按钮
    fromProClick(doe){
      if (doe===1){
        //数据校核
        if (this.fromProcessFrom.processNum==='' ||this.fromProcessFrom.processNum===undefined || this.fromProcessFrom.processNum==='undefined'){
          alert('请输入追溯方案编号')
          return;
        }
        else if (this.fromProcessFrom.processDate==='' ||this.fromProcessFrom.processDate===undefined || this.fromProcessFrom.processDate==='undefined'){
          alert('请输入完成时间')
          return;
        }
        else if (this.fromProcessFrom.processPer==='' ||this.fromProcessFrom.processPer===undefined || this.fromProcessFrom.processPer==='undefined'){
          alert('请输入负责人')
          return;
        }
        else if (this.fromProCheckListFrom.length===0){
          alert('请选择需要追溯的部门')
          return
        }
        //编辑数据赋值
        this.fromProcessFrom.processEditName=this.useName
        this.fromProcessFrom.processEditDate=this.nowDate()
        // 多选框内容进行组合
        let suspectLis=''
        for (let i = 0; i < this.fromProCheckListFrom.length; i++) {
          suspectLis=suspectLis+this.fromProCheckListFrom[i]+'|-|'
        }
        this.fromProcessFrom.suspectList=suspectLis.slice(0,-3)

        //关闭弹窗
        this.fromProDialog1=false
      }
      if (doe===2){
        //数据校核
        if (this.fromProcessFrom.assWorkList==='' ||this.fromProcessFrom.assWorkList===undefined || this.fromProcessFrom.assWorkList==='undefined'){
          alert('请输入追溯方案编号')
          return;
        }
        else if (this.fromProcessFrom.assWorkPer==='' ||this.fromProcessFrom.assWorkPer===undefined || this.fromProcessFrom.assWorkPer==='undefined'){
          alert('请输入完成时间')
          return;
        }
        else if (this.fromProcessFrom.processDate==='' ||this.fromProcessFrom.processDate===undefined || this.fromProcessFrom.processDate==='undefined'){
          alert('请输入负责人')
          return;
        }
        //编辑数据赋值
        this.fromProcessFrom.assWorkEditName=this.useName
        this.fromProcessFrom.assWorkEditDate=this.nowDate()
        //关闭弹窗
        this.fromProDialog2=false
      }
      if (doe===3){
        //数据校核
        if (this.fromProcessFrom.macWorkList==='' ||this.fromProcessFrom.macWorkList===undefined || this.fromProcessFrom.macWorkList==='undefined'){
          alert('请输入追溯方案编号')
          return;
        }
        else if (this.fromProcessFrom.macWorkPer==='' ||this.fromProcessFrom.macWorkPer===undefined || this.fromProcessFrom.macWorkPer==='undefined'){
          alert('请输入完成时间')
          return;
        }
        else if (this.fromProcessFrom.macWorkDate==='' ||this.fromProcessFrom.macWorkDate===undefined || this.fromProcessFrom.macWorkDate==='undefined'){
          alert('请输入负责人')
          return;
        }
        //编辑数据赋值
        this.fromProcessFrom.macWorkEditName=this.useName
        this.fromProcessFrom.macWorkEditDate=this.nowDate()
        //关闭弹窗
        this.fromProDialog3=false
      }
      if (doe===4){
        //数据校核
        if (this.fromProcessFrom.logDepList==='' ||this.fromProcessFrom.logDepList===undefined || this.fromProcessFrom.logDepList==='undefined'){
          alert('请输入追溯方案编号')
          return;
        }
        else if (this.fromProcessFrom.logDepPer==='' ||this.fromProcessFrom.logDepPer===undefined || this.fromProcessFrom.logDepPer==='undefined'){
          alert('请输入完成时间')
          return;
        }
        else if (this.fromProcessFrom.logDepDate==='' ||this.fromProcessFrom.logDepDate===undefined || this.fromProcessFrom.logDepDate==='undefined'){
          alert('请输入负责人')
          return;
        }
        //编辑数据赋值
        this.fromProcessFrom.logDepEditName=this.useName
        this.fromProcessFrom.logDepEditDate=this.nowDate()
        //关闭弹窗
        this.fromProDialog4=false
      }
      if (doe===5){
        //数据校核
        if (this.fromProcessFrom.containNum==='' ||this.fromProcessFrom.containNum===undefined || this.fromProcessFrom.containNum==='undefined'){
          alert('请输入追溯方案编号')
          return;
        }
        else if (this.fromProcessFrom.containPer==='' ||this.fromProcessFrom.containPer===undefined || this.fromProcessFrom.containPer==='undefined'){
          alert('请输入完成时间')
          return;
        }
        else if (this.fromProcessFrom.containDate==='' ||this.fromProcessFrom.containDate===undefined || this.fromProcessFrom.containDate==='undefined'){
          alert('请输入负责人')
          return;
        }
        //编辑数据赋值
        this.fromProcessFrom.containEditName=this.useName
        this.fromProcessFrom.containEditDate=this.nowDate()
        //关闭弹窗
        this.fromProDialog5=false
      }
      if (doe===6){
        //数据校核
        if (this.fromProcessFrom.reportNum==='' ||this.fromProcessFrom.reportNum===undefined || this.fromProcessFrom.reportNum==='undefined'){
          alert('请输入追溯报告编号')
          return;
        }
        else if (this.fromProcessFrom.reportPer==='' ||this.fromProcessFrom.reportPer===undefined || this.fromProcessFrom.reportPer==='undefined'){
          alert('请输入完成时间')
          return;
        }
        else if (this.fromProcessFrom.reportDate==='' ||this.fromProcessFrom.reportDate===undefined || this.fromProcessFrom.reportDate==='undefined'){
          alert('请输入负责人')
          return;
        }
        //编辑数据赋值
        this.fromProcessFrom.reportEditName=this.useName
        this.fromProcessFrom.reportEditDate=this.nowDate()
        //关闭弹窗
        this.fromProDialog6=false
      }

      //组合字符串，向后端写入
      const str=
                //追溯方案编号
          this.fromProcessFrom.processNum+'|%|'+
                //追溯方案下发人
          this.fromProcessFrom.processPer+'|%|'+
                //下发时间
          this.fromProcessFrom.processDate+'|%|'+
                //需要开展追溯的部门
          this.fromProcessFrom.suspectList+'|%|'+
                //编辑时间
          this.fromProcessFrom.processEditDate+'|%|'+
                //上传人
          this.fromProcessFrom.processEditName+'|%|'+
                //预留
          this.fromProcessFrom.process1+'|%|'+
                //预留
          this.fromProcessFrom.process2+'|%|'+
                //预留
          this.fromProcessFrom.process3+'|%|'+
                //需要输出过程追溯记录表的部门：装配车间
          this.fromProcessFrom.assWork+'|%|'+//0代表不需要；1代表需要；
                //产品过程追溯记录表编号
          this.fromProcessFrom.assWorkList+'|%|'+
                //责任人
          this.fromProcessFrom.assWorkPer+'|%|'+
                //完成时间
          this.fromProcessFrom.assWorkDate+'|%|'+
                //编辑人
          this.fromProcessFrom.assWorkEditName+'|%|'+
                //编辑时间
          this.fromProcessFrom.assWorkEditDate+'|%|'+
                //预留
          this.fromProcessFrom.assWork1+'|%|'+
                //预留
          this.fromProcessFrom.assWork2+'|%|'+
                //预留
          this.fromProcessFrom.assWork3+'|%|'+
                //需要输出过程追溯记录表的部门：机加车间
          this.fromProcessFrom.macWork+'|%|'+//0代表不需要；1代表需要；
                //产品过程追溯记录表编号
          this.fromProcessFrom.macWorkList+'|%|'+
                //责任人
          this.fromProcessFrom.macWorkPer+'|%|'+
                //完成时间
          this.fromProcessFrom.macWorkDate+'|%|'+
                //编辑人
          this.fromProcessFrom.macWorkEditName+'|%|'+
                //编辑时间
          this.fromProcessFrom.macWorkEditDate+'|%|'+
                //预留
          this.fromProcessFrom.macWork1+'|%|'+
                //预留
          this.fromProcessFrom.macWork2+'|%|'+
                //预留
          this.fromProcessFrom.macWork3+'|%|'+
                //需要输出过程追溯记录表的部门：物流科
          this.fromProcessFrom.logDep+'|%|'+//0代表不需要；1代表需要；
                //产品过程追溯记录表编号
          this.fromProcessFrom.logDepList+'|%|'+
                //责任人
          this.fromProcessFrom.logDepPer+'|%|'+
                //完成时间
          this.fromProcessFrom.logDepDate+'|%|'+
                //编辑人
          this.fromProcessFrom.logDepEditName+'|%|'+
                //编辑时间
          this.fromProcessFrom.logDepEditDate+'|%|'+
                //预留
          this.fromProcessFrom.logDep1+'|%|'+
                //预留
          this.fromProcessFrom.logDep2+'|%|'+
                //预留
          this.fromProcessFrom.logDep3+'|%|'+
                //需要输出过程追溯记录表的部门：品技科
          this.fromProcessFrom.tecDep+'|%|'+//0代表不需要；1代表需要；
                //产品过程追溯记录表编号
          this.fromProcessFrom.tecDepList+'|%|'+
                //责任人
          this.fromProcessFrom.tecDepPer+'|%|'+
                //完成时间
          this.fromProcessFrom.tecDepDate+'|%|'+
                //编辑人
          this.fromProcessFrom.tecDepEditName+'|%|'+
                //编辑时间
          this.fromProcessFrom.tecDepEditDate+'|%|'+
                //预留
          this.fromProcessFrom.tecDep1+'|%|'+
                //预留
          this.fromProcessFrom.tecDep2+'|%|'+
                //预留
          this.fromProcessFrom.tecDep3+'|%|'+
                //产品遏制表编号（品技）
          this.fromProcessFrom.containNum+'|%|'+
                //责任人
          this.fromProcessFrom.containPer+'|%|'+
                //完成时间
          this.fromProcessFrom.containDate+'|%|'+
                //编辑人
          this.fromProcessFrom.containEditName+'|%|'+
                //编辑时间
          this.fromProcessFrom.containEditDate+'|%|'+
                //预留
          this.fromProcessFrom.contain1+'|%|'+
                //预留
          this.fromProcessFrom.contain2+'|%|'+
                //预留
          this.fromProcessFrom.contain3+'|%|'+
                //品管出具
                //追溯报告编号
          this.fromProcessFrom.reportNum+'|%|'+
                //责任人
          this.fromProcessFrom.reportPer+'|%|'+
                //完成时间
          this.fromProcessFrom.reportDate+'|%|'+
                //编辑人
          this.fromProcessFrom.reportEditName+'|%|'+
                //编辑时间
          this.fromProcessFrom.reportEditDate+'|%|'+
                //预留
          this.fromProcessFrom.report1+'|%|'+
                //预留
          this.fromProcessFrom.report2+'|%|'+
                //预留
          this.fromProcessFrom.report3
      //向后端写入数据
      this.editOneFiledById(this.suspectScope.row.id,'fromProcess',str)
      //组合数据
      //组合数据
      this.fromProcessData=_.cloneDeep(this.fromProcessFrom)
      this.suspectScope.row.fromProcess=str
      this.suspectList[this.suspectScope.$index].fromProcess=str
      //给多选框进行赋值
      if (this.fromProcessData.suspectList==='' || this.fromProcessData.suspectList===undefined || this.fromProcessData.suspectList==='undefined'){
        this.fromProCheckList=[]
      }
      else {
        this.fromProCheckList=[]
        let checkListTemp=this.fromProcessData.suspectList.split('|-|')
        for (let i = 0; i < checkListTemp.length; i++) {
          this.fromProCheckList.push(checkListTemp[i])
        }
      }

    },
    //不良品评审上的弹窗控制函数
    unqualified(doe){
      this.unqualifiedDoe=doe
      //数据赋值
      if (Object.keys(this.unqualifiedData).length === 0){
        //没有处理过，需要一个新的
        this.unqualifiedFrom={
          //不良品评审编号
          unqualifiedList:'',
          //不良品评审意见
          unqualified:'',//1:让步接收；2.挑选；3：返工返修；
          //负责人
          unqualifiedPer:'',
          //完成时间
          unqualifiedDate:'',
          //编辑人
          unqualifiedEditName:'',
          //编辑时间
          unqualifiedEditDate:'',
          //预留
          unqualified1:'',
          //预留
          unqualified2:'',
          //预留
          unqualified3:'',


        }
      }
      else {
        this.unqualifiedFrom=_.cloneDeep(this.unqualifiedData)
      }
      if (doe===1){
        //如果日期为空，填充为今天日期
        if (this.unqualifiedFrom.unqualifiedDate==='' || this.unqualifiedFrom.unqualifiedDate===undefined || this.unqualifiedFrom.unqualifiedDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.unqualifiedFrom.unqualifiedDate = this.nowDate()
        }
        this.titleUse='（责任部门）您正在更新不良品评审'
        this.unqualifiedDialog1=true
      }
    },
    //不良品评审上的弹窗点击确定按钮
    unqualifiedClick(doe){
      if (doe===1){
        //数据校验
        if (this.unqualifiedFrom.unqualifiedList==='' || this.unqualifiedFrom.unqualifiedList===undefined || this.unqualifiedFrom.unqualifiedList==='undefined'){
          alert('请输入评审表编号')
          return;
        }
        else if (this.unqualifiedFrom.unqualifiedDate==='' ||this.unqualifiedFrom.unqualifiedDate===undefined || this.unqualifiedFrom.unqualifiedDate==='undefined'){
          alert('请选择评审日期')
          return;
        }
        else if (this.unqualifiedFrom.unqualifiedPer==='' || this.unqualifiedFrom.unqualifiedPer===undefined || this.unqualifiedFrom.unqualifiedPer==='undefined'){
          alert('请输入评审人员')
          return;
        }
        else if (this.unqualifiedFrom.unqualified==='' || this.unqualifiedFrom.unqualified===undefined || this.unqualifiedFrom.unqualified==='undefined'){
          alert('请选择评审意见')
          return;
        }
        //组合数据
        this.unqualifiedFrom.unqualifiedEditName=this.useName
        this.unqualifiedFrom.unqualifiedEditDate=this.nowDate()
        this.unqualifiedDialog1=false
      }
      //组合数据
      const str=
            //不良品评审编号
          this.unqualifiedFrom.unqualifiedList+'|%|'+
            //不良品评审意见
          this.unqualifiedFrom.unqualified+'|%|'+//1:让步接收；2.挑选；3：返工返修；
          //负责人
          this.unqualifiedFrom.unqualifiedPer+'|%|'+
          //完成时间
          this.unqualifiedFrom.unqualifiedDate+'|%|'+
          //编辑人
          this.unqualifiedFrom.unqualifiedEditName+'|%|'+
          //编辑时间
          this.unqualifiedFrom.unqualifiedEditDate+'|%|'+
          //预留
          this.unqualifiedFrom.unqualified1+'|%|'+
          //预留
          this.unqualifiedFrom.unqualified2+'|%|'+
          //预留
          this.unqualifiedFrom.unqualified3

      //向后端写入数据
      this.editOneFiledById(this.suspectScope.row.id,'unqualified',str)
      //组合数据
      this.unqualifiedData=_.cloneDeep(this.unqualifiedFrom)
      this.suspectScope.row.unqualified=str
      this.suspectList[this.suspectScope.$index].unqualified=str
    },
    //不良品处理上的弹窗控制函数
    rework(doe){
      //数据初始化
      this.reworkDoe=doe
      //数据赋值
      if (Object.keys(this.reworkData).length === 0){
        //没有处理过，需要一个新的
        this.reworkFrom={
          //让步接收相关
          //记录装机完成时间
          compromiseEndDate:'',
          //记录装配发动机号（文本框，可以写一段文字）
          compromiseEngineNum:'',
          //装配信息
          compromiseText:'',
          //记录负责人
          compromisePer:'',
          //记录编辑人
          compromiseEditName:'',
          //记录编辑时间
          compromiseDate:'',
          // 预留
          compromise1:'',
          // 预留
          compromise2:'',
          //预留
          compromise3:'',
          //记录挑选相关的内容
          //《质量异常处理通知单》编号
          processNum:'',
          //挑选标准
          processStandard:'',
          //负责人
          processTecPer:'',
          //完成时间
          processTecDate:'',
          //编辑人
          processEditName:'',
          //编辑时间
          processEditDate:'',
          //预留
          processTec1:'',
          //预留
          processTec2:'',
          // 预留
          processTec3:'',
          //挑选结果
          processResult:'',
          //挑选负责人
          processWorkPre:'',
          //挑选完成时间
          processWorkDate:'',
          //编辑人
          processWorkEditName:'',
          //编辑完成时间
          processWorkEditDate:'',
          //预留
          processWork1:'',
          //预留
          processWork2:'',
          //预留
          processWork3:'',
          //不合格品标记/开票，检验处理信息
          //开票说明
          ticketText:'',
          //开票负责人
          ticketPer:'',
          //开票完成时间
          ticketDate:'',
          //不良品数量：
          ticketNmu:'',
          //编辑人
          ticketEditName:'',
          //编辑时间
          ticketEditDate:'',
          //预留
          ticket1:'',
          //预留
          ticket2:'',
          //预留
          ticket3:'',
          //挑选产品装机记录
          processEngineNum:'',
          //装机日期
          processNumDate:'',
          //装机说明
          processText:'',
          //责任人
          processPer:'',
          //编辑人
          processNumEditName:'',
          //编辑时间
          processNumEditDate:'',
          //预留
          process1:'',
          //预留
          process2:'',
          //预留
          process3:'',
          //返工返修要领书相关的变量
          //返工返修指导书编号
          workBookNum:'',
          //完善缺陷清单
          workBookList:'',
          //责任人
          workPer:'',
          //完成时间
          workDate:'',
          //编辑人
          workEditName:'',
          //编辑时间
          workEditDate:'',
          //预留
          work1:'',
          //预留
          work2:'',
          //预留
          work3:'',

          //返修过程相关
          //返修完成时间
          returnedDate:'',
          //返修负责人
          returnedPer:'',
          //返修结果描述
          returnedResult:'',
          //返工返修记录表完成
          returnedEnd:'',
          //返工返修所用时间
          returnedTime:'',
          //编辑人
          returnedEditName:'',
          //编辑时间
          //预留
          returned1:'',
          //预留
          returned2:'',
          //预留
          returned3:'',

          //检验确认相关
          //检验数据是否合格
          testResult:'',
          //判定结论
          testVerdict:'',
          //判定人
          testPre:'',
          //判定时间
          testDate:'',
          //编辑人
          testEditName:'',
          //编辑时间
          testEditDate:'',
          // 预留
          test1:'',
          // 预留
          test2:'',
          //预留
          test3:'',

          //品技确认相关

          // 确认人
          tecPer:'',
          // 确认时间
          tecDate:'',
          // 确认结果
          tecResult:'',
          // 编辑人
          tecEditName:'',
          // 编辑时间
          tecEditDate:'',
          // 预留
          tec1:'',
          // 预留
          tec2:'',
          // 预留
          tec3:'',

          //再次装机相关
          //装机时间
          endDate:'',
          //发动机号
          endEngineId:'',
          //负责人
          endPer:'',
          //装机描述
          endText:'',
          // 编辑时间
          endEditDate:'',
          // 编辑人
          endEditPer:'',
          // 预留
          end1:'',
          // 预留
          end2:'',
          // 预留
          end3:'',
        }
      }
      else {
        this.reworkFrom=_.cloneDeep(this.reworkData)
      }
      //让步接收中的装机情况
      if (doe===1){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.compromiseEndDate==='' || this.reworkFrom.compromiseEndDate===undefined || this.reworkFrom.compromiseEndDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.compromiseEndDate = this.nowDate()
        }
        this.titleUse='（责任部门）您正在更新让步后续信息'
        this.reworkDialog1=true
      }
      //挑选中的品技下发挑选标准
      else if (doe===2){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.processTecDate==='' || this.reworkFrom.processTecDate===undefined || this.reworkFrom.processTecDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.processTecDate = this.nowDate()
        }
        this.titleUse='（品技科）您正在更新挑选标准信息'
        this.reworkDialog2=true
      }
      //挑选中的执行部门挑选情况
      else if (doe===3){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.processWorkDate==='' || this.reworkFrom.processWorkDate===undefined || this.reworkFrom.processWorkDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.processWorkDate = this.nowDate()
        }
        this.titleUse='（责任部门）您正在更新挑选结果信息'
        this.reworkDialog3=true
      }
      //挑选中的品管科不良品开票
      else if (doe===4){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.ticketDate==='' || this.reworkFrom.ticketDate===undefined || this.reworkFrom.ticketDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.ticketDate = this.nowDate()
        }
        if (this.reworkFrom.ticketNmu===''  || this.reworkFrom.ticketNmu===undefined || this.reworkFrom.ticketNmu==='undefined'){
          this.reworkFrom.ticketNmu=0
        }
        this.titleUse='（品管科）您正在更新挑选不良品处理'
        this.reworkDialog4=true
      }
      //挑选中的执行部门跟踪装机
      else if (doe===5){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.processNumDate==='' || this.reworkFrom.processNumDate===undefined || this.reworkFrom.processNumDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.processNumDate = this.nowDate()
        }
        this.titleUse='（责任部门）您正在更新挑选产品装机记录'
        this.reworkDialog5=true
      }
      //返工返修中的品技下发标准
      else if (doe===6){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.workDate==='' || this.reworkFrom.workDate===undefined || this.reworkFrom.workDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.workDate = this.nowDate()
        }
        if (this.reworkFrom.workBookList==='' || this.reworkFrom.workBookList===undefined || this.reworkFrom.workBookList==='undefined'){
          this.reworkFrom.workBookList=''
        }
        this.titleUse='（品技科）您正在更新返修标准更新记录'
        this.reworkDialog6=true
      }
      //返工返修中的实施部门实施返修
      else if (doe===7){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.returnedDate==='' || this.reworkFrom.returnedDate===undefined || this.reworkFrom.returnedDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.returnedDate = this.nowDate()
        }
        if (this.reworkFrom.returnedStartDate==='' || this.reworkFrom.returnedStartDate===undefined || this.reworkFrom.returnedStartDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.returnedStartDate = this.nowDate()
        }
        if (this.reworkFrom.returnedEnd==='' || this.reworkFrom.returnedEnd===undefined || this.reworkFrom.returnedEnd==='undefined'){
          this.reworkFrom.returnedEnd=''
        }
        if (this.reworkFrom.returnedTime==='' || this.reworkFrom.returnedTime===undefined || this.reworkFrom.returnedTime==='undefined'){
          this.reworkFrom.returnedTime=0
        }
        if (this.reworkFrom.returnedNum==='' || this.reworkFrom.returnedNum===undefined || this.reworkFrom.returnedNum==='undefined'){
          this.reworkFrom.returnedNum=0
        }
        this.titleUse='（责任部门）您正在更新返修完成情况'
        this.reworkDialog7=true
      }
      //返工返修中的检验部门确认返修
      else if (doe===8){
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.testDate==='' || this.reworkFrom.testDate===undefined || this.reworkFrom.testDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.testDate = this.nowDate()
        }
        this.titleUse='（责任部门）您正在更新返修结果'
        this.reworkDialog8=true
      }
      //返工返修中的责任部门专辑确认
      else if (doe===9){
        console.log('到这里了')
        //如果日期为空，填充为今天日期
        if (this.reworkFrom.endDate==='' || this.reworkFrom.endDate===undefined || this.reworkFrom.endDate==='undefined'){
          // 格式化日期为 yyyy-dd-MM
          this.reworkFrom.endDate = this.nowDate()
        }
        this.titleUse='（责任部门）您正在更新装机情况'
        this.reworkDialog9=true
      }
    },
    //不良品处理上的弹窗点击确定
    reworkClick(doe){
      if (doe===1){
        //数据校验
        if (this.reworkFrom.compromisePer==='' || this.reworkFrom.compromisePer===undefined || this.reworkFrom.compromisePer==='undefined'){
          alert('请输入责任人')
          return;
        }
        else if (this.reworkFrom.compromiseEndDate==='' ||this.reworkFrom.compromiseEndDate===undefined || this.reworkFrom.compromiseEndDate==='undefined'){
          alert('请选择评审日期')
          return;
        }
        else if (this.reworkFrom.compromiseEngineNum==='' || this.reworkFrom.compromiseEngineNum===undefined || this.reworkFrom.compromiseEngineNum==='undefined'){
          alert('请输入装机发动机号')
          return;
        }
        else if (this.reworkFrom.compromiseText==='' || this.reworkFrom.compromiseText===undefined || this.reworkFrom.compromiseText==='undefined'){
          alert('请输入装机过程描述，注明是否有异常')
          return;
        }
        //组合数据
        this.reworkFrom.compromiseEditName=this.useName
        this.reworkFrom.compromiseDate=this.nowDate()
        this.reworkDialog1=false
      }
      else if (doe===2){
        //数据校验
        if (this.reworkFrom.processNum==='' || this.reworkFrom.processNum===undefined || this.reworkFrom.processNum==='undefined'){
          alert('请输入《质量异常处理通知单编号》')
          return;
        }
        else if (this.reworkFrom.processStandard==='' ||this.reworkFrom.processStandard===undefined || this.reworkFrom.processStandard==='undefined'){
          alert('请输入《挑选标准》')
          return;
        }
        else if (this.reworkFrom.processTecPer==='' || this.reworkFrom.processTecPer===undefined || this.reworkFrom.processTecPer==='undefined'){
          alert('请输入负责人')
          return;
        }
        else if (this.reworkFrom.processTecDate==='' || this.reworkFrom.processTecDate===undefined || this.reworkFrom.processTecDate==='undefined'){
          alert('请选择完成时间')
          return;
        }
        //组合数据
        this.reworkFrom.processEditName=this.useName
        this.reworkFrom.processEditDate=this.nowDate()
        this.reworkDialog2=false
      }
      else if (doe===3){
        //数据校验
        if (this.reworkFrom.processResult==='' || this.reworkFrom.processResult===undefined || this.reworkFrom.processResult==='undefined'){
          alert('请输入挑选结果')
          return;
        }
        else if (this.reworkFrom.processWorkPre==='' ||this.reworkFrom.processWorkPre===undefined || this.reworkFrom.processWorkPre==='undefined'){
          alert('请输入负责人')
          return;
        }
        else if (this.reworkFrom.processWorkDate==='' || this.reworkFrom.processWorkDate===undefined || this.reworkFrom.processWorkDate==='undefined'){
          alert('请输入完成时间')
          return;
        }
        //组合数据
        this.reworkFrom.processWorkEditName=this.useName
        this.reworkFrom.processWorkEditDate=this.nowDate()
        this.reworkDialog3=false
      }
      else if (doe===4){
        //数据校验
        if (this.reworkFrom.ticketText==='' || this.reworkFrom.ticketText===undefined || this.reworkFrom.ticketText==='undefined'){
          alert('请输入开票信息')
          return;
        }
        else if (this.reworkFrom.ticketPer==='' ||this.reworkFrom.ticketPer===undefined || this.reworkFrom.ticketPer==='undefined'){
          alert('请输入负责人')
          return;
        }
        else if (this.reworkFrom.ticketNmu==='' || this.reworkFrom.ticketNmu===undefined || this.reworkFrom.ticketNmu==='undefined'){
          alert('请输入不良数量')
          return;
        }
        else if (this.reworkFrom.ticketDate==='' || this.reworkFrom.ticketDate===undefined || this.reworkFrom.ticketDate==='undefined'){
          alert('请选择完成时间')
          return;
        }
        //组合数据
        this.reworkFrom.ticketEditName=this.useName
        this.reworkFrom.ticketEditDate=this.nowDate()
        this.reworkDialog4=false
      }
      else if (doe===5){
        //数据校验
        if (this.reworkFrom.processEngineNum==='' || this.reworkFrom.processEngineNum===undefined || this.reworkFrom.processEngineNum==='undefined'){
          alert('请输入装机发动机号')
          return;
        }
        else if (this.reworkFrom.processText==='' ||this.reworkFrom.processText===undefined || this.reworkFrom.processText==='undefined'){
          alert('请输入装机说明')
          return;
        }
        else if (this.reworkFrom.processPer==='' || this.reworkFrom.processPer===undefined || this.reworkFrom.processPer==='undefined'){
          alert('请输入责任人')
          return;
        }
        else if (this.reworkFrom.processNumDate==='' || this.reworkFrom.processNumDate===undefined || this.reworkFrom.processNumDate==='undefined'){
          alert('请选择完成日期')
          return;
        }
        //组合数据
        this.reworkFrom.processNumEditName=this.useName
        this.reworkFrom.processNumEditDate=this.nowDate()
        this.reworkDialog5=false
      }
      else if (doe===6){
        //数据校验
        if (this.reworkFrom.workBookNum==='' || this.reworkFrom.workBookNum===undefined || this.reworkFrom.workBookNum==='undefined'){
          alert('请输入返工返修指导书编号')
          return;
        }
        else if (this.reworkFrom.workBookList==='' ||this.reworkFrom.workBookList===undefined || this.reworkFrom.workBookList==='undefined'){
          alert('请输入缺陷清单完善情况')
          return;
        }
        else if (this.reworkFrom.workPer==='' || this.reworkFrom.workPer===undefined || this.reworkFrom.workPer==='undefined'){
          alert('请输入责任人')
          return;
        }
        else if (this.reworkFrom.workDate==='' || this.reworkFrom.workDate===undefined || this.reworkFrom.workDate==='undefined'){
          alert('请选择完成日期')
          return;
        }
        //组合数据
        this.reworkFrom.workEditName=this.useName
        this.reworkFrom.workEditDate=this.nowDate()
        this.reworkDialog6=false
      }
      else if (doe===7){
        //数据校验
        if (this.reworkFrom.returnedResult==='' || this.reworkFrom.returnedResult===undefined || this.reworkFrom.returnedResult==='undefined'){
          alert('请描述返修结果')
          return;
        }
        else if (this.reworkFrom.returnedEnd==='' ||this.reworkFrom.returnedEnd===undefined || this.reworkFrom.returnedEnd==='undefined'){
          alert('请选择返修记录表是否完成')
          return;
        }
        else if (this.reworkFrom.returnedPer==='' || this.reworkFrom.returnedPer===undefined || this.reworkFrom.returnedPer==='undefined'){
          alert('请输入责任人')
          return;
        }
        else if (this.reworkFrom.returnedDate==='' || this.reworkFrom.returnedDate===undefined || this.reworkFrom.returnedDate==='undefined'){
          alert('请选择完成日期')
          return;
        }
        //组合数据
        this.reworkFrom.returnedEditName=this.useName
        this.reworkFrom.returnedEditDate=this.nowDate()
        this.reworkDialog7=false
      }
      else if (doe===8){
        //数据校验
        if (this.reworkFrom.testVerdict==='' || this.reworkFrom.testVerdict===undefined || this.reworkFrom.testVerdict==='undefined'){
          alert('请选择返修数据情况')
          return;
        }
        else if (this.reworkFrom.testResult==='' ||this.reworkFrom.testResult===undefined || this.reworkFrom.testResult==='undefined'){
          alert('请选择是否合格')
          return;
        }
        else if (this.reworkFrom.testPre==='' || this.reworkFrom.testPre===undefined || this.reworkFrom.testPre==='undefined'){
          alert('请输入责任人')
          return;
        }
        else if (this.reworkFrom.testDate==='' || this.reworkFrom.testDate===undefined || this.reworkFrom.testDate==='undefined'){
          alert('请选择完成日期')
          return;
        }
        //组合数据
        this.reworkFrom.tecEditName=this.useName
        this.reworkFrom.tecEditDate=this.nowDate()
        this.reworkDialog8=false
      }
      else if (doe===9){
        //数据校验
        if (this.reworkFrom.endEngineId==='' || this.reworkFrom.endEngineId===undefined || this.reworkFrom.endEngineId==='undefined'){
          alert('请输入发动机号')
          return;
        }
        else if (this.reworkFrom.endText==='' ||this.reworkFrom.endText===undefined || this.reworkFrom.endText==='undefined'){
          alert('请输入装机描述')
          return;
        }
        else if (this.reworkFrom.endPer==='' || this.reworkFrom.endPer===undefined || this.reworkFrom.endPer==='undefined'){
          alert('请输入责任人')
          return;
        }
        else if (this.reworkFrom.endDate==='' || this.reworkFrom.endDate===undefined || this.reworkFrom.endDate==='undefined'){
          alert('请选择完成日期')
          return;
        }
        //组合数据
        this.reworkFrom.endEditPer=this.useName
        this.reworkFrom.endEditDate=this.nowDate()
        this.reworkDialog9=false
      }
      //组合数据
      const str = Object.keys(this.reworkFrom).reduce((acc, key) => {
        return acc + (acc ? '|%|' : '') + this.reworkFrom[key];
      }, '')
      //向后端写入数据
      this.editOneFiledById(this.suspectScope.row.id,'rework',str)
      //组合数据
      this.reworkData=_.cloneDeep(this.reworkFrom)
      this.suspectScope.row.rework=str
      this.suspectList[this.suspectScope.$index].rework=str
    },
    //问题解决的弹窗
    solve(doe){
      //组合数据
      //数据初始化
      this.reworkDoe=doe
      //数据赋值
      if (Object.keys(this.solveData).length === 0){
        //没有处理过，需要一个新的
        this.reworkFrom={
          //让步接收相关
          //记录装机完成时间
          compromiseEndDate:'',
          //记录装配发动机号（文本框，可以写一段文字）
          compromiseEngineNum:'',
          //装配信息
          compromiseText:'',
          //记录负责人
          compromisePer:'',
          //记录编辑人
          compromiseEditName:'',
          //记录编辑时间
          compromiseDate:'',
          // 预留
          compromise1:'',
          // 预留
          compromise2:'',
          //预留
          compromise3:'',
          //记录挑选相关的内容
          //《质量异常处理通知单》编号
          processNum:'',
          //挑选标准
          processStandard:'',
          //负责人
          processTecPer:'',
          //完成时间
          processTecDate:'',
          //编辑人
          processEditName:'',
          //编辑时间
          processEditDate:'',
          //预留
          processTec1:'',
          //预留
          processTec2:'',
          // 预留
          processTec3:'',
          //挑选结果
          processResult:'',
          //挑选负责人
          processWorkPre:'',
          //挑选完成时间
          processWorkDate:'',
          //编辑人
          processWorkEditName:'',
          //编辑完成时间
          processWorkEditDate:'',
          //预留
          processWork1:'',
          //预留
          processWork2:'',
          //预留
          processWork3:'',
          //不合格品标记/开票，检验处理信息
          //开票说明
          ticketText:'',
          //开票负责人
          ticketPer:'',
          //开票完成时间
          ticketDate:'',
          //不良品数量：
          ticketNmu:'',
          //编辑人
          ticketEditName:'',
          //编辑时间
          ticketEditDate:'',
          //预留
          ticket1:'',
          //预留
          ticket2:'',
          //预留
          ticket3:'',
          //挑选产品装机记录
          processEngineNum:'',
          //装机日期
          processNumDate:'',
          //装机说明
          processText:'',
          //责任人
          processPer:'',
          //编辑人
          processNumEditName:'',
          //编辑时间
          processNumEditDate:'',
          //预留
          process1:'',
          //预留
          process2:'',
          //预留
          process3:'',
          //返工返修要领书相关的变量
          //返工返修指导书编号
          workBookNum:'',
          //完善缺陷清单
          workBookList:'',
          //责任人
          workPer:'',
          //完成时间
          workDate:'',
          //编辑人
          workEditName:'',
          //编辑时间
          workEditDate:'',
          //预留
          work1:'',
          //预留
          work2:'',
          //预留
          work3:'',

          //返修过程相关
          //返修完成时间
          returnedDate:'',
          //返修负责人
          returnedPer:'',
          //返修结果描述
          returnedResult:'',
          //返工返修记录表完成
          returnedEnd:'',
          //返工返修所用时间
          returnedTime:'',
          //编辑人
          returnedEditName:'',
          //编辑时间
          //预留
          returned1:'',
          //预留
          returned2:'',
          //预留
          returned3:'',

          //检验确认相关
          //检验数据是否合格
          testResult:'',
          //判定结论
          testVerdict:'',
          //判定人
          testPre:'',
          //判定时间
          testDate:'',
          //编辑人
          testEditName:'',
          //编辑时间
          testEditDate:'',
          // 预留
          test1:'',
          // 预留
          test2:'',
          //预留
          test3:'',

          //品技确认相关

          // 确认人
          tecPer:'',
          // 确认时间
          tecDate:'',
          // 确认结果
          tecResult:'',
          // 编辑人
          tecEditName:'',
          // 编辑时间
          tecEditDate:'',
          // 预留
          tec1:'',
          // 预留
          tec2:'',
          // 预留
          tec3:'',

          //再次装机相关
          //装机时间
          endDate:'',
          //发动机号
          endEngineId:'',
          //负责人
          endPer:'',
          //装机描述
          endText:'',
          // 编辑时间
          endEditDate:'',
          // 编辑人
          endEditPer:'',
          // 预留
          end1:'',
          // 预留
          end2:'',
          // 预留
          end3:'',
        }
      }
      else {
        this.solveFrom=_.cloneDeep(this.solveData)
      }
      if (doe===1){
        this.titleUse='您正在编辑问题解决过程'
        this.solveDialog1=true
        this.$nextTick(() => {
          this.initEditor();
          this.initEditor1();
          this.initEditor2();
          this.editor.txt.html(this.solveFrom.causeAnalysis)
          this.editor1.txt.html(this.solveFrom.measure)
          this.editor2.txt.html(this.solveFrom.extend)
        })
      }
      else if (doe===2){
        this.titleUse='您正在判断是可结题'
        if (this.solveFrom.endDate==='' || this.solveFrom.endDate===undefined || this.solveFrom.endDate==='undefined'){
          this.solveFrom.endDate=''
        }
        this.solveDialog2=true
      }
      else if (doe===3){
        this.titleUse='您正在编辑问题名称'
        this.solveDialog3=true
      }
    },
    //文件解决的弹窗中点击确定按钮
    solveClick(doe){
      if (doe===1){
        //组合数据
        this.solveFrom.causeAnalysis=this.editor.txt.html()
        this.solveFrom.measure=this.editor1.txt.html()
        this.solveFrom.extend=this.editor2.txt.html()
        this.solveFrom.issEditName=this.useName
        this.solveFrom.issEditDate=this.nowDate()
      }
      else if(doe===2){
        //组合数据
        this.solveFrom.endEditName=this.useName
        this.solveFrom.endEditDate=this.nowDate()
        this.solveDialog2=false
      }
      else if (doe===3){
        this.solveFrom.issEditDate=this.nowDate()
        this.solveFrom.issEditName=this.useName
        this.solveDialog3=false
      }
      //向后端写入数据
      //组合数据
      const str = Object.keys(this.solveFrom).reduce((acc, key) => {
        return acc + (acc ? '|%|' : '') + this.solveFrom[key];
      }, '')
      //向后端写入数据
      this.editOneFiledById(this.suspectScope.row.id,'solve',str)
      //组合数据
      this.solveData=_.cloneDeep(this.solveFrom)
      this.suspectScope.row.solve=str
      this.suspectList[this.suspectScope.$index].solve=str
    },
    //辅助函数：向后端查询所有的数据
    selectAll(){
      //向后端发送请求
      this.$request.post("/suspectSelectAll").then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }else {
          this.suspectList=[]
          this.suspectList=result.data
        }
      })
    },
    //辅助函数：根据id，向后端的一个字段写入内容
    editOneFiledById(id,filedName,filedVal){
      this.$request.post('/suspectEditOneFiledById',{
        id:id,
        filedName:filedName,
        filedVal:filedVal
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }else {
          alert('保存成功')
        }
      })
    },
    //辅助函数：获取当前时间，并格式化为YYYY-MM-DD时间格式
    nowDate(){
      const date = new Date();
      // 获取年份（yyyy）
      const year = date.getFullYear();

      // 获取日期（dd），并填充前导零
      const day = String(date.getDate()).padStart(2, '0');

      // 获取月份（MM），并填充前导零
      const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以需要+1

      // 格式化日期为 yyyy-dd-MM
      return `${year}-${month}-${day}`;
    },
    //辅助函数：对返工返修清单数据进行更新
    reworkListDataNew(){
      this.reworkList=[]
      //对大表数据进行循环，找出需要在返工返修清单的数据
      for (let i = 0; i < this.suspectList.length; i++) {
        //判断是否为返工返修处理
        if (this.suspectList[i].unqualified!=='' || this.suspectList[i].unqualified!==undefined || this.suspectList[i].unqualified!=='undefined'){
          let reworkIs=this.suspectList[i].unqualified.split('|%|')[1]
          if (reworkIs===3 || reworkIs==='3'){
            let temp={
              //发生日期
              occurDate:this.suspectList[i].occurDate,
              //发现工序
              position:this.suspectList[i].position,
              //机型
              modelId:this.suspectList[i].modelId,
              //发动机号/零部件名称
              partId:this.suspectList[i].partId,
              //问题描述
              describeUse:this.suspectList[i].describeUse,
              //返工/返修开始日期
              reworkStartDate:this.suspectList[i].rework.split('|%|')[53],
              //维修方法及更换零部件（注明批次厂家）明细
              workBookNum:this.suspectList[i].rework.split('|%|')[44],
              //维修人
              returnedPer:this.suspectList[i].rework.split('|%|')[56],
              //返工返修数量
              workNum:this.suspectList[i].rework.split('|%|')[54],
              //返工、返修工时
              returnedTime:this.suspectList[i].rework.split('|%|')[59],
              //检验数据
              testResult:this.suspectList[i].rework.split('|%|')[64],
              //判定结论
              testVerdict:this.suspectList[i].rework.split('|%|')[65],
              //判定人
              testPre:this.suspectList[i].rework.split('|%|')[66],
              //确认人
              workPer:this.suspectList[i].rework.split('|%|')[46],
            }
            this.reworkList.push(temp)
          }
        }
      }
    }
  },

  mounted() {
    this.inquiry()
    //数据初始化
    this.suspectList=[]
    this.suspectListShow=[]
    this.judgmentList={}
    this.judgmentListForm={}
    this.fromJudgmentData={}
    this.fromJudgmentFrom={}
    this.fromProcessData={}
    this.fromProcessFrom={}
    this.unqualifiedData={}
    this.unqualifiedFrom={}
    this.reworkData={}
    this.reworkFrom={}
    this.solveData={}
    this.solveFrom={}
    this.selectAll();
  },
  //组件销毁前的函数
  beforeDestroy() {
    // 组件销毁前，销毁 wangEditor 实例
    if (this.editor) {
      this.editor.destroy();
      this.editor = null;
    }
    if (this.editor1) {
      this.editor1.destroy();
      this.editor1 = null;
    }
    if (this.editor2) {
      this.editor2.destroy();
      this.editor2 = null;
    }
  },
}
</script>

<style scoped>
/* 主体左侧的工作步骤栏用到的数据包围的div的样式*/

.el-footer {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  border-left-color: white;
  border-top: white;
}

.el-aside {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  height: 89vh;
}

.el-main {
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-left-color: white;
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.headMain{
  color: #ffffff; /* 设置字体颜色为红色 */
  font-size: 18px;
}
.center-text {
  /* 使用 margin-left 和 margin-right auto 来实现居中效果 */
  margin-left: auto;
  margin-right: auto;
  /* 注意：如果 header 内只有这两个元素，你可能不需要 margin-right: auto */
}
.el-button {
  white-space: normal !important;
  word-break: break-word !important;}

/*自定义样式*/
</style>